Page Type layout

Permalink
How does C5 determine choose a layout when adding a new page type? My system is defaulting to a right_sidebar layout which is not a part of my current theme. I can't seem to find a way to change it.

jolson
 
campbell replied on at Permalink Reply
campbell
When I was trying to define a new page type to develop a template for my users, I ran into the same issue. I wanted my new default to use the full width layout, so what I did was go into my theme folder (in concrete > themes and find the full.php file. I made a copy of that file and renamed it, giving it the name I wanted to use for the new page type (for example, newname.php). Then I went back into the dashboard to page types and created my new page type, entering the new name into the handle field (in this example, it would be "newname" without the quotes).

There may be a better workaround - especially if you want to custom define a layout instead of using one of the existing ones, but since all I wanted to do was use one of the existing layouts OTHER than the right sidebar, it worked for me.
jordanlev replied on at Permalink Reply
jordanlev
Yeah this gets quite confusing, because Page Types sometimes kinda sorta are the same as page layouts, but sometimes they're not.

Here's how it works:

* You can have as many page types as you want, which are added to the system via Dashboard -> Pages and Themes -> Page Types (although a few of them are pre-installed if you check the "install sample content" checkbox when you create your site, or if you installed C5 via Simple Scripts with your web host or something like that).

* If a file exists in your theme directory with the exact same name as the page type's handle, then that file will be used for the layout.

* If no file matching the page type handle can be found in the theme directory, then the "default.php" layout file is used.

So... in your case, I think what's happening is that your system is *NOT* defaulting to a right_sidebar layout, but instead is defaulting to the "default" layout, which coincidentally happens to have a sidebar on the right. So if you want to change the default layout so it doesn't have a right sidebar, edit the "default.php" file in your theme.

Hope that makes sense!

-Jordan
jolson replied on at Permalink Reply
jolson
Makes perfect sense - thanks.

Sent from my iPhone