concrete5 homepage single page
Permalink
i would like to make my homepage on my clients website a singlepage.
i tried making a home.php both in the theme directory and in the single pages directory.
what am i doing wrong, thank you.
i tried making a home.php both in the theme directory and in the single pages directory.
what am i doing wrong, thank you.
I've never tried but I don't think you can. What are you trying to achieve by making your Home page a 'Single Page'? What problem are you trying to solve?
i'd like to have a controller for the homepage.
Ahh, yes.
Do these links help:
http://www.concrete5.org/community/forums/customizing_c5/page-type-...
and near the bottom of this page:
http://andrewembler.com/posts/basic-mvc-in-concrete5/...
Do these links help:
http://www.concrete5.org/community/forums/customizing_c5/page-type-...
and near the bottom of this page:
http://andrewembler.com/posts/basic-mvc-in-concrete5/...
i just tried doing what that guy answered.
i made a page_types directory in the controller directory.
a file in the called home.php (my page type is called home.php)
put inside that file:
that didn't work. any idea what i did wrong? do i need to re-install my theme? thoughts?
i made a page_types directory in the controller directory.
a file in the called home.php (my page type is called home.php)
put inside that file:
that didn't work. any idea what i did wrong? do i need to re-install my theme? thoughts?
I've never done what you are doing but you have to name these things correctly. Both references I gave you tell you to name the class in your controller file (the one in [root]/controllers/page_types/home.php) to be:
class HomePageTypeController extends Controller {
.
.
.
}
class HomePageTypeController extends Controller {
.
.
.
}
thank you so much, you saved me a big hassle!
i also needed to restart my theme for some reason , not sure why but i did. restart as in uninstall and re-install.
i also needed to restart my theme for some reason , not sure why but i did. restart as in uninstall and re-install.
Glad to help.
Instead of removing and re-installing, did you try 'Inspecting' your theme again to add the home.php as weyboat mentioned below?
Instead of removing and re-installing, did you try 'Inspecting' your theme again to add the home.php as weyboat mentioned below?
To get your home.php file appear in your themes list of templates,
once you have included it in the theme folder (as you have already),
You must then go to dashboard/themes and "inspect" your theme, you should see your new template listed and a select box which should be pre-selected (ticked)
Click Save, you should now find your home.php template when you view the "design" part of the page properties dialog..
once you have included it in the theme folder (as you have already),
You must then go to dashboard/themes and "inspect" your theme, you should see your new template listed and a select box which should be pre-selected (ticked)
Click Save, you should now find your home.php template when you view the "design" part of the page properties dialog..