Site Admin > Page Defaults > Content :: Define Template-specific Default Content
Posted: Mon Jun 09, 2008 6:36 pm
Hi. I'm running CMS Made Simple 1.2.5. I'm using PHP 5.0.4, and MySQL 4.1.20, and this is all working with Apache/2.0.54 running on Linux 2.6.11. I have created three user-defined templates which invoke the FCKeditorX editor. My FCKeditorX editor is version 1.1.0.
The user-defined templates are made up of several content blocks I have defined in Content > Global Content Blocks, and the structure for the site is outlined below:
Section Header 1 (uses Template 1)
Page 1-a
Page 1-b
Page 1-c
Section Header 2 (uses Template 2)
Page 2-a
Page 2-b
Page 2-c
Section Header 3 (uses Template 3)
Page 3-a
Page 3-b
Page 3-c
I see under Site Admin > Page Defaults there is an option to set Content, but I would like to specify default content that may be adapted for each section/template (as opposed to the whole site).
In other words, pages 1-a, 1-b and 1-c in Section 1 (Template 1) would all have the same default content to be changed as needed. Section 2 (Template 2) pages, 2-a, 2-b and 2-c, would also all have the same default content, but this default content will be different from the default content for Section 1 pages. Similarly for Section 3 (Template 3).
The gist of what I would like to do is insert logic in each template which runs thusly:
{ content defaultvalue = template_content_block }
where template_content_block is a content block I've defined in Content > Global Content Blocks (or I could just as easily cram into a PHP include file), and there will be three of these -- one for each template.
I've searched the forum and online documentation (I'd be really surprised if someone else hasn't already asked about this), but I'll be darned if I can find the procedure and/or syntax outlined for how to do this.
I'm a Web programmer by trade and am familiar with proprietary code usage in general, but I'm new to CMSMS. I sure hope someone can help point me in the right direction.
Thanks,
Mattie
The user-defined templates are made up of several content blocks I have defined in Content > Global Content Blocks, and the structure for the site is outlined below:
Section Header 1 (uses Template 1)
Page 1-a
Page 1-b
Page 1-c
Section Header 2 (uses Template 2)
Page 2-a
Page 2-b
Page 2-c
Section Header 3 (uses Template 3)
Page 3-a
Page 3-b
Page 3-c
I see under Site Admin > Page Defaults there is an option to set Content, but I would like to specify default content that may be adapted for each section/template (as opposed to the whole site).
In other words, pages 1-a, 1-b and 1-c in Section 1 (Template 1) would all have the same default content to be changed as needed. Section 2 (Template 2) pages, 2-a, 2-b and 2-c, would also all have the same default content, but this default content will be different from the default content for Section 1 pages. Similarly for Section 3 (Template 3).
The gist of what I would like to do is insert logic in each template which runs thusly:
{ content defaultvalue = template_content_block }
where template_content_block is a content block I've defined in Content > Global Content Blocks (or I could just as easily cram into a PHP include file), and there will be three of these -- one for each template.
I've searched the forum and online documentation (I'd be really surprised if someone else hasn't already asked about this), but I'll be darned if I can find the procedure and/or syntax outlined for how to do this.
I'm a Web programmer by trade and am familiar with proprietary code usage in general, but I'm new to CMSMS. I sure hope someone can help point me in the right direction.
Thanks,
Mattie