Theme or template?
Permalink
I would like a site to contain 4 different page types.
The primary page type has all the normal title, main, nav, & footer sections.
But the other page types have no nav or footer sections.
I see how I can click Design on a page to specify a different theme for a page. But I would like it so that when anyone added a page of this page type, that the 'theme' or perhaps 'template' would be selected automatically.
I see how to create a special theme that could be manually selected for this page type. But is that the best practice?
Do I really just meed a different template by page type, or another theme?
Is there a way to link a template to a page type?
The primary page type has all the normal title, main, nav, & footer sections.
But the other page types have no nav or footer sections.
I see how I can click Design on a page to specify a different theme for a page. But I would like it so that when anyone added a page of this page type, that the 'theme' or perhaps 'template' would be selected automatically.
I see how to create a special theme that could be manually selected for this page type. But is that the best practice?
Do I really just meed a different template by page type, or another theme?
Is there a way to link a template to a page type?
When I made this post, I thought that a Theme and a Template were two different things. But as I read more about C5 it appears that many people use these terms interchangeably. I understand how to install and activate a theme that applies to every page.
I also see how to assign a Theme to a Page Type. But I did not find that adding a new page and selecting the Page Type would inherit the Theme attached to the Page Type. Rather, I found that the new page would assume the Theme of the parent page. Perhaps that depends on how the new page is added.
I have pretty much accomplished what I was after, by creating a new theme, adding a page of the desired page type, then using the Design option to change the theme when necessary. I was hoping to eliminate the need for that step, as the content provider in this example are salespeople creating quotes, not web content providers that know a lot about site design and programming.
The problem that I have yet to solve, is that the Page Type I created contains some initial content in several blocks. That is what I was, perhaps incorrectly, calling a Template. One of the blocks is a form. When I add a page, the initial content blocks and form blocks display just fine, and can be edited as needed. But the form really doesn't need to be changed except for the Form Name which I need to change on the Options tab so that when submitted, I know what quote was approved by the customer.
But when I change the Form Name to match the Page Name and Save, it complains: Please add at least one Question to your form. The form shows with all 5 questions on the page. But attempting to Edit or Preview the form, it shows "Invalid Permissions". I am doing this with full admin privileges. Perhaps there is a file on the disc with the wrong file permissions, but this is a form, not a static page. In fact, I get the same Invalid Permissions attempting to edit the form using the Defaults for the Page Type.
I am using C5 version 5.5.0 which I understand is new. I even upgraded to 5.5.1 today to see if that would help. But I still have the same problem.
Basically I want a Page Type to have Default content that includes a form, where I can either change the Form Name or include in the Form Submission, the actual Page Name as shown in the Sitemap.
Sorry for the lengthy explanation, and thanks for your guidance.
I also see how to assign a Theme to a Page Type. But I did not find that adding a new page and selecting the Page Type would inherit the Theme attached to the Page Type. Rather, I found that the new page would assume the Theme of the parent page. Perhaps that depends on how the new page is added.
I have pretty much accomplished what I was after, by creating a new theme, adding a page of the desired page type, then using the Design option to change the theme when necessary. I was hoping to eliminate the need for that step, as the content provider in this example are salespeople creating quotes, not web content providers that know a lot about site design and programming.
The problem that I have yet to solve, is that the Page Type I created contains some initial content in several blocks. That is what I was, perhaps incorrectly, calling a Template. One of the blocks is a form. When I add a page, the initial content blocks and form blocks display just fine, and can be edited as needed. But the form really doesn't need to be changed except for the Form Name which I need to change on the Options tab so that when submitted, I know what quote was approved by the customer.
But when I change the Form Name to match the Page Name and Save, it complains: Please add at least one Question to your form. The form shows with all 5 questions on the page. But attempting to Edit or Preview the form, it shows "Invalid Permissions". I am doing this with full admin privileges. Perhaps there is a file on the disc with the wrong file permissions, but this is a form, not a static page. In fact, I get the same Invalid Permissions attempting to edit the form using the Defaults for the Page Type.
I am using C5 version 5.5.0 which I understand is new. I even upgraded to 5.5.1 today to see if that would help. But I still have the same problem.
Basically I want a Page Type to have Default content that includes a form, where I can either change the Form Name or include in the Form Submission, the actual Page Name as shown in the Sitemap.
Sorry for the lengthy explanation, and thanks for your guidance.
I don't think you will need more than one theme; themes are used when you want to have a completely different look and feel, or the same set of page layouts but with different colours, etc.
I often put an extra class on some of the main page divs, so that I can style the different page types easily. You can even go as far as putting a class on your body tag that automatically comes from the name of the page type file (e.g. <body class="left_sidebar">
(I think that works)
This gives you the flexibility to style the different page types of your site quite differently.
I'm not 100% sure what you are asking in your question though. If you are asking is there a way to automatically pick a different theme when you pick a different page type, the answer is probably no. Feel free to further explain what you after.
I often put an extra class on some of the main page divs, so that I can style the different page types easily. You can even go as far as putting a class on your body tag that automatically comes from the name of the page type file (e.g. <body class="left_sidebar">
<body class="<?php echo $c->getCollectionTypeHandle();?>" >
(I think that works)
This gives you the flexibility to style the different page types of your site quite differently.
I'm not 100% sure what you are asking in your question though. If you are asking is there a way to automatically pick a different theme when you pick a different page type, the answer is probably no. Feel free to further explain what you after.
To customise your pages go to Dashboard-> Pages and Themes-> Page Types -> Select the 'Default' for your page types and start customising (All edits for Page Defaults take effect immediately)..
Those changes will automatically appear on new pages. So you can select a design/ theme for a specific page-type and it will be applied every time that page type is added.
http://yourwebsitedomain.com/index.php/dashboard/pages/types/...