Hello all,
I'm having a hard time trying to figure out how to incorporate pages into templates. Even after looking at the included templates, I don't understand how they work together. Can someone give me an simple explanation on how these work together?
Templates and Pages
-
westis
Re: Templates and Pages
Hi EsquireX,
In your template, put the tag {content} where you want your content to appear. Then when you add a new page (Content -> Pages -> Add New Content) you select what template to use for each page and add your content. Then whatever you add as content for each page will appear where you have put the {content} tag in your template. The menu will be made up of those pages, although you can select not to show a page in the menu in the Options tab for each page.
If you want several content blocks, have a look here: http://www.cmsmadesimple.org/moduleinte ... eturnid=63
In the content box for each page you can also put tags for modules, such as {cms_module module="news"} if you want to display news. Such tags can also be put in the template if you want them to appear on every page using that template.
I realize from looking at your site that you are not using any module or plugin for your menu. If that's the way you will go, then you will have to hide all pages from the menu and link to each page manually in your own menu, using the page id. That means you have to manually edit your menu if you want to add another page or move the menu links, which may be a bit hard.
You can find more about how to build a template at http://forum.cmsmadesimple.org/index.ph ... ml#msg9411
Hope that helps.
In your template, put the tag {content} where you want your content to appear. Then when you add a new page (Content -> Pages -> Add New Content) you select what template to use for each page and add your content. Then whatever you add as content for each page will appear where you have put the {content} tag in your template. The menu will be made up of those pages, although you can select not to show a page in the menu in the Options tab for each page.
If you want several content blocks, have a look here: http://www.cmsmadesimple.org/moduleinte ... eturnid=63
In the content box for each page you can also put tags for modules, such as {cms_module module="news"} if you want to display news. Such tags can also be put in the template if you want them to appear on every page using that template.
I realize from looking at your site that you are not using any module or plugin for your menu. If that's the way you will go, then you will have to hide all pages from the menu and link to each page manually in your own menu, using the page id. That means you have to manually edit your menu if you want to add another page or move the menu links, which may be a bit hard.
You can find more about how to build a template at http://forum.cmsmadesimple.org/index.ph ... ml#msg9411
Hope that helps.
-
EsquireX
Re: Templates and Pages
Thank you so much!
I understand. Now, as far as "Pages" go, do I look at those as content blocks? I was under the impression that I could use a "Page" as an actual page of content but only for a particular web page - like a "Page" for my blog, a "Page" for my forum, etc.
I was thinking I could, for example, create a div in the template and put the content tag inside the div. My issue with that is how do I call up that particular page but that was answered with the use of "page ids". But how do I know what the "page ID" is for a "Page" and what would the url look like?
I hope this is clear and thanks a lot for the help!
I understand. Now, as far as "Pages" go, do I look at those as content blocks? I was under the impression that I could use a "Page" as an actual page of content but only for a particular web page - like a "Page" for my blog, a "Page" for my forum, etc.
I was thinking I could, for example, create a div in the template and put the content tag inside the div. My issue with that is how do I call up that particular page but that was answered with the use of "page ids". But how do I know what the "page ID" is for a "Page" and what would the url look like?
I hope this is clear and thanks a lot for the help!
-
EsquireX
Re: Templates and Pages
Thank you, Partricia. I appreciate the information. The hardest part I have left is to put it all together and that won't be bad at all. Once again, thank you for your help.
-
EsquireX
Re: Templates and Pages
Thank you. I got it going. I'm now sorting out all the HTML, CSS and Javascript code. I've created files for some of the Javascript and call them from the source of the page (thank you). I now only use the "{literal}" tag only when absolutely necessary. It has simplified the layout quite a bit and keeps everything tidy in addition to making it easier to find problems within the page.
I've been reading some of your posts on the subject and you've simplified the explanations (are you helping to write the documentation?). Thanks again!
I've been reading some of your posts on the subject and you've simplified the explanations (are you helping to write the documentation?). Thanks again!
