Add a single page
Permalink
Hello,
I cannot get a single page to work. I want the single page to take over the blocks form the main page. I can't find good documentation on this. As I see it now, in my theme- folder, I should add view.php for single pages. Should there be different code in there than default.php?
I cannot get a single page to work. I want the single page to take over the blocks form the main page. I can't find good documentation on this. As I see it now, in my theme- folder, I should add view.php for single pages. Should there be different code in there than default.php?
I'm not sure what you mean by "take over the blocks from the main page," but view.php differs from default.php in this respect, for view.php to do its job, you need to have the following code:
This emits whatever the single page's output is. As such, it should come after the top parts of your page, and before the bottom parts.
<?php print $innerContent ?>
This emits whatever the single page's output is. As such, it should come after the top parts of your page, and before the bottom parts.
Change the "YourThemeName" to the name of your theme including the "",
If your theme is called greensalad then replace "YourThemeName" with "greensalad"
Then copy all of those single pages from root/concrete/single_pages folder to root/single_pages folder,
This will allow you to tweak the single pages without them being overwritten by a future upgrade,