Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Using a different template for the home page

Go to End

11 Posts   32354 Views


13 May 2008 at 5:53am Community Member, 6 Posts

I went through the "Using a different template for the home page" section of the tutorial several times and I cannot get this to work. I want my home page to have a different layout than the rest of the site. I did multiple flushes and nothing changed. Any suggestions?

Thank you.


13 May 2008 at 6:47am 53 Posts


One thing you could check is did you also change the page type for the home page in the cms?

If you followed the tutorial exactly then it should work.




13 May 2008 at 7:58am Community Member, 6 Posts

The option to change it does not appear in the dropdown in the cms. Anybody else having this problem?



13 May 2008 at 9:35am Community Member, 6 Posts

Can somebody tell me which folder goes into?

Is it /public_html/themes/blackcandy/templates/?

or /public_html/themes/blackcandy/templates/Layout/



13 May 2008 at 1:06pm Community Member, 32 Posts

If your HomePage is completely different put the template directly under templates/
If it is based on then put it under templates/Layouts.
You will need a file called HomePage.php in mysite/code and you will need to select that page type in the CMS.
To refresh hold down ctrl and add ?flush=1 to the URL. Sometimes i have had to change browsers to see a change reflected.


14 May 2008 at 9:45am Community Member, 6 Posts

It still doesn't work. The option to create a home page does not appear in the dropdown option in the CMS. Anybody out there know how to use this?


14 May 2008 at 10:39am Community Member, 32 Posts

Somebody correct me if I am wrong, but if you create a file called WhateverPage.php in mysite/code then db/build/?flush=1 (do it in the CMS), then 'Create a WhateverPage' has to appear in the drop down for create page type. If not, something is very wrong. It seems to be it is practically the premise for the whole system. What options appear in your dropdown?


14 May 2008 at 2:25pm 38 Posts

bcm75204 - check the tutorials more carefully ( - If you follow them it will show you how to add pagetypes to the CMS. How you then style them depends on the template that is used for the site.

Given I don't know much of your setup, here's how I think you would add a home page:

1. Add HomePage.php to /mysite/code/ (with the same code as listed under

2. If you want the home page to be COMPLETELY different, add a template file called to /themes/blackcandy/templates/. You can copy and paste the data from into it and make any changes you want. If you want to edit the CSS of the design, you can either include a new stylesheet into the page or just make additions to BlackCandy's (found in /themes/blackcandy/css/).

3. This point in the tutorial is key - "Every page type also has a database table corresponding to it. Every time we modify the database, we need to rebuild it. We can do this by going to http://localhost:3000/db/build?flush=1." You need to flush the database by visiting /db/build and then refresh the CMS (F5) or the new pagetype will not be available.

Go to Top