Additional Content Modules
Additional Content Modules
Hi all,
I've added support for additional content blocks into the svn tree now.
Simplistic Instructions:
1. Edit your template. Additional content blocks are added using the construct: {content block="name of this block"}
2. Add new content (or Edit a current content page). When you select the template with the additional content block defined, you will see a new text area appear labelled "name of this block".
3. That's it!
Please test and report any bugs!
Thanks.
I've added support for additional content blocks into the svn tree now.
Simplistic Instructions:
1. Edit your template. Additional content blocks are added using the construct: {content block="name of this block"}
2. Add new content (or Edit a current content page). When you select the template with the additional content block defined, you will see a new text area appear labelled "name of this block".
3. That's it!
Please test and report any bugs!
Thanks.
Re: Additional Content Modules
I just want to say that I've been testing this, and it's great.
It even does the right thing if you, say, change templates on a page. If the new template has only one content area, the other one(s) vanish. But if you switch back to a template that has more than one content area, it's all still there.
This capability is especially useful in sites where there are multiple columns of content in the "main content" area of the page. This way, you can put the formatting in the template. Before, you needed to put divs or tables in the content itself, and users could easily screw up the page. With this change, you can protect users from themselves (and save yourself a lot of time fixing things).
It even does the right thing if you, say, change templates on a page. If the new template has only one content area, the other one(s) vanish. But if you switch back to a template that has more than one content area, it's all still there.
This capability is especially useful in sites where there are multiple columns of content in the "main content" area of the page. This way, you can put the formatting in the template. Before, you needed to put divs or tables in the content itself, and users could easily screw up the page. With this change, you can protect users from themselves (and save yourself a lot of time fixing things).
Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
Re: Additional Content Modules
My original Template had this section related to the content:
I added the modules for multiple content and changed the template to:
On the edit content page with the TinyMCE WYSIWYG editor active I get:
Content type dropdown
a WYSIWYG menu
Menu Text Page Alias and template dropdowns
a WYSIWYG menu
a textarea with the label content
a textarea with the label Title (WYSIWYG not active)
a textarea with the label Main Content (WYSIWYG not active)
Headtags teatarea etc....
With the HTMLArea WYSIWYG active I get:
Content type, Menu Text, Page Alias, and template dropdowns
a textarea with the label content (WYSIWYG active)
a textarea with the label Title (WYSIWYG active)
a textarea with the label Main Content (WYSIWYG active)
Headtags teatarea etc....
Code: Select all
<div class="mcontent">{content}</div>
Code: Select all
<div class="mcontent">
<div class="boxhead">{content block="Title"}</div>
<div class="boxcontent">{content block="Main Content"}</div>
</div>
Content type dropdown
a WYSIWYG menu
Menu Text Page Alias and template dropdowns
a WYSIWYG menu
a textarea with the label content
a textarea with the label Title (WYSIWYG not active)
a textarea with the label Main Content (WYSIWYG not active)
Headtags teatarea etc....
With the HTMLArea WYSIWYG active I get:
Content type, Menu Text, Page Alias, and template dropdowns
a textarea with the label content (WYSIWYG active)
a textarea with the label Title (WYSIWYG active)
a textarea with the label Main Content (WYSIWYG active)
Headtags teatarea etc....
Greg
Re: Additional Content Modules
Interesting. I left my original {content} tag alone, but added a {content block="other"}, and TinyMCE worked correctly for me.
Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
Re: Additional Content Modules
The source code with TinyMCE active shows the initilization of TinyMCE as:
and the textareas are properly identified as:
but with either WYSIWYG editor active the textarea from the old template definition still appears:
Code: Select all
tinyMCE.init({
mode : "exact",
elements : "content_en, Title, Main_Content",
Code: Select all
<textarea id="Title" name="Title" cols="80" rows="15">
<textarea id="Main_Content" name="Main_Content" cols="80" rows="15">
Code: Select all
<textarea id="content_en" name="content_en" cols="80" rows="20">
Greg
Re: Additional Content Modules
I tried to add another column but it won't work?
This is what I input as my template:
{title}
{stylesheet}
{cms_module module='phplayers'}
{content}
{content block="Other"}
I don't get another text field for one thing and I also get this error:
Fatal error: Smarty error: [in preview:cms58A.tmp line 313]: syntax error: unrecognized tag 'content' (Smarty_Compiler.class.php, line 576) in c:\wamp\www\cms\lib\smarty\Smarty.class.php on line 1088
This is what I input as my template:
{title}
{stylesheet}
{cms_module module='phplayers'}
{content}
{content block="Other"}
I don't get another text field for one thing and I also get this error:
Fatal error: Smarty error: [in preview:cms58A.tmp line 313]: syntax error: unrecognized tag 'content' (Smarty_Compiler.class.php, line 576) in c:\wamp\www\cms\lib\smarty\Smarty.class.php on line 1088
Re: Additional Content Modules
He posted this twice. He was using an older version.
Re: Additional Content Modules
Will this functionality make it into 0.10 like it's said on the roadmap? I had a quick glance at the beta but didn't get it to work.
Re: Additional Content Modules
It's in the beta and should be used like it's discussed above.
Re: Additional Content Modules
I've tried out the 0.10beta as well I really like the new look. The columns thing still gives me the same error so I guess it hasn't been implemented or maybe it's a bug perhaps? This is what I get:
Fatal error: Smarty error: [in preview:cms4F.tmp line 312]: syntax error: unrecognized tag 'content' (Smarty_Compiler.class.php, line 580) in c:\wamp\www\cms\lib\smarty\Smarty.class.php on line 1088
Fatal error: Smarty error: [in preview:cms4F.tmp line 312]: syntax error: unrecognized tag 'content' (Smarty_Compiler.class.php, line 580) in c:\wamp\www\cms\lib\smarty\Smarty.class.php on line 1088
Re: Additional Content Modules
How did you insert the {content} tag into the template?
Re: Additional Content Modules
is it only possible to add 2 extra blocks? i try adding 3 and i get the 'content' tag error as explained previously by another user
thanks
thanks
Re: Additional Content Modules
You're getting it on preview or the actual page?
Re: Additional Content Modules
actual pages
0.10 beta3
0.10 beta3
Last edited by fadum on Mon Jun 13, 2005 12:00 pm, edited 1 time in total.