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 Attachment

robertsoniv
 
robertsoniv replied on at Permalink Reply
robertsoniv
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.
ScottSandbakken replied on at Permalink Reply
ScottSandbakken
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.
robertsoniv replied on at Permalink Reply
robertsoniv
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.
shahroq replied on at Permalink Reply
shahroq
try add a new page type with completely new handle 'my_xxx' and see if this one works or not.
robertsoniv replied on at Permalink Reply
robertsoniv
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 >.<
robertsoniv replied on at Permalink Reply
robertsoniv
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.
tallacman replied on at Permalink Reply
tallacman
If you zip your theme and attach it here we could spot the problem in a second...
robertsoniv replied on at Permalink Reply 1 Attachment
robertsoniv
Thanks for your help :)

It's pretty incomplete still.
tallacman replied on at Permalink Reply
tallacman
Looks like a javascript error of some sort. Edit bar disappeared on activation and removing the js got it back.
robertsoniv replied on at Permalink Reply
robertsoniv
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.
tallacman replied on at Permalink Reply
tallacman
This code:

<?php
   $stack = Stack::getByName('Mini Header Nav');
   $ax = Area::get($stack, STACKS_AREA_NAME);
   $ax->display($stack);
 ?>

is also giving trouble.
robertsoniv replied on at Permalink Reply
robertsoniv
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();
?>
tallacman replied on at Permalink Reply
tallacman
I use this:

<?php  
   $a = new GlobalArea('Header Nav');
   $a->display();
?>
robertsoniv replied on at Permalink Reply
robertsoniv
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?
tallacman replied on at Permalink Reply
tallacman
Yes. And any stack you can name in the theme will get created automatically.
robertsoniv replied on at Permalink Best Answer Reply
robertsoniv
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
tallacman replied on at Permalink Reply
tallacman
I wish the cache was turned off by default. It really can be on while setting up a site.