page layouts

Permalink
Hello,

I recently set up a con5 site and didn't populate it with sample data. When I go into the themes to get a different page layout it only gives me one option which is the the left sidebar but it gives me no other options is it possible to add page layouts?

 
adajad replied on at Permalink Reply
adajad
bigran replied on at Permalink Reply
Thank you. It was a lot easier than I thought but I am still facing a small challenge

I was able to create the pages but now when i try to add or apply the page they are not working. Any clue?
adajad replied on at Permalink Reply
adajad
Please elaborate. What is not working? Do you get blank pages? Do you get errors?
bigran replied on at Permalink Reply
adajad

it just uses the default page type which has a right side bar and the main. I actually put several page types together i.e. main page , header no side bar, left side bar & main and the page type with header, main and two boxes below the main. I add a new page and pick the page type and it still gives me the default page type which is the main with a side bar on the right. I dont get any errors it just doesn't apply the the page type to the new page or if I want to change the page type on an existing page. Really pretty strange. I hope that makes it a little clearer.

Thanks again
adajad replied on at Permalink Reply
adajad
Ok, this is the important thing I think you missed when reading my previous link.

"NOTE: If a file exists in your theme matching the handle for the page type, that file is used to render the page. If no file matches the page type handle, default.php is used for rendering."

That means when creating your page type you should have a file in your themes folder matching the handle name (pretty explanatory in the note).

So if you have a file in your themes folder named header_no_side_bar.php the page type name could be whatever (i.e. "Header no side bar") but the handle name should match the file name without the extension - in this case "header_no_side_bar".

I hope this helps.
bigran replied on at Permalink Reply
adajad,

I understand now, its very clear on the logic, but the problem still remains on how do I create the .php files for the pages? I went into the themes folder and it doesnt show any of the pages I created so this is why it goes to the default. How do I add the pages to my themes folder?

Sorry to be so naive but I am not too familiar with php.

Thanks again
adajad replied on at Permalink Reply
adajad
If you never ask, you will never know.

You could, if you are satisfied with the overall layout of your default.php (editable areas, graphics elements) use that as base for your page types and just add different default blocks on the different page types to get the desired effect. If you do it that way you don't need to create any additional php files - just new page types with default blocks.

If for some reason the overall layout doesn't match your needs you will need to create other php files to match your pages. The easiest way to do this but still keep the site together is to make a copy of default.php, name it something else (still within your themes folder) and make some changes in that file. You will then need to have a look at this How-To written by jordanlev and 12345j (both way more competent than I am): http://www.concrete5.org/documentation/how-tos/designers/making-a-t...
bigran replied on at Permalink Reply
thanks for all your help the information is priceless and has help me out big time.

Cheers!
adajad replied on at Permalink Reply
adajad
I'm glad I could help. :D