Default.php is always being used and it shouldn't
Permalink 1 user found helpful
I feel like I've done everything correctly and even tried adding page types two different ways:
1. Create page_type_name.php, add the page type through inspect
2. Create the new page type in the dashboard and handle it page_type_name, then create page_type_name.php in the theme folder.
Both resulted in me being able to assign them to pages, but default.php is still used! I attached a screenshot detailing the situation.
I've tried clearing the cache and I've looked into permissions a little bit but I'm not sure if that would be the issue.
Any help would be very appreciated :)
EDIT: I figured out why I wasn't seeing anything other than the default page type! Thanks to this post here:http://www.concrete5.org/community/forums/usage/new-page-type-not-w...
You need to turn off the Override Cache setting in System & Settings --> Cache & Speed Settings
1. Create page_type_name.php, add the page type through inspect
2. Create the new page type in the dashboard and handle it page_type_name, then create page_type_name.php in the theme folder.
Both resulted in me being able to assign them to pages, but default.php is still used! I attached a screenshot detailing the situation.
I've tried clearing the cache and I've looked into permissions a little bit but I'm not sure if that would be the issue.
Any help would be very appreciated :)
EDIT: I figured out why I wasn't seeing anything other than the default page type! Thanks to this post here:http://www.concrete5.org/community/forums/usage/new-page-type-not-w...
You need to turn off the Override Cache setting in System & Settings --> Cache & Speed Settings
I'm seriously at a loss... Worked with advanced permissions a bit and still nothing. It just has to be something super simple that I'm not doing.
Did you "Inspect" your theme? You need to go to the Themes page and click the Inspect button.
You probably should delete the page types you added first.
You probably should delete the page types you added first.
Yes, that's how I added the first page type. Once you put page_type_name.php in the theme folder you can inspect the theme and create a new page type using the newly added file.
try add a new page type with completely new handle 'my_xxx' and see if this one works or not.
I have, I created a blank page type (save for the header and footer) called my_test_type.php and went into Themes -> Inspect and created the page type. Assigned it to a newly created page and it still gives me default.php >.<
Clearing the cache doesn't do anything..
Checking Theme -> Inspect everything looks normal, it says My Test Type will use the my_test_type handle which should link to my_test_type.php which is in the theme folder.
Creating the page type name and handle through the dashboard first doesn't change the result either.
I turned on advanced permissions and changed the Add Page Type permission to custom and checked all of them just to be sure.
Just for some reason the default.php is the only one that is actually being pulled in by the CMS.
Checking Theme -> Inspect everything looks normal, it says My Test Type will use the my_test_type handle which should link to my_test_type.php which is in the theme folder.
Creating the page type name and handle through the dashboard first doesn't change the result either.
I turned on advanced permissions and changed the Add Page Type permission to custom and checked all of them just to be sure.
Just for some reason the default.php is the only one that is actually being pulled in by the CMS.
If you zip your theme and attach it here we could spot the problem in a second...
Thanks for your help :)
It's pretty incomplete still.
It's pretty incomplete still.
Looks like a javascript error of some sort. Edit bar disappeared on activation and removing the js got it back.
Strange... it works fine on my localhost install and firebug console isn't giving me any errors. I'll see if taking out the js brings back the page types though.
This code:
is also giving trouble.
<?php $stack = Stack::getByName('Mini Header Nav'); $ax = Area::get($stack, STACKS_AREA_NAME); $ax->display($stack); ?>
is also giving trouble.
Would this be a more up to date way of hardcoding a stack into the theme?
<?php $stack = Stack::getByName('Mini Header Nav'); $stack->display(); ?>
I use this:
<?php $a = new GlobalArea('Header Nav'); $a->display(); ?>
Well, I want the stack to be hardcoded into the page... that would just give me a new global area where my navigation is instead, wouldn't it?
Yes. And any stack you can name in the theme will get created automatically.
Nice. I switched it around to reflect your suggestion.
Also, I figured out why I wasn't seeing anything other than the default page type! Thanks to this post here:http://www.concrete5.org/community/forums/usage/new-page-type-not-w...
You need to turn off the Override Cache setting in System & Settings --> Cache & Speed Settings
Also, I figured out why I wasn't seeing anything other than the default page type! Thanks to this post here:http://www.concrete5.org/community/forums/usage/new-page-type-not-w...
You need to turn off the Override Cache setting in System & Settings --> Cache & Speed Settings
I wish the cache was turned off by default. It really can be on while setting up a site.