Page 1 of 2

Additional Content Modules

Posted: Thu Mar 03, 2005 7:57 pm
by Akrabat
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.

Re: Additional Content Modules

Posted: Thu Mar 03, 2005 8:21 pm
by sjg
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).

Re: Additional Content Modules

Posted: Fri Mar 04, 2005 2:13 am
by Greg
My original Template had this section related to the content:

Code: Select all

<div class="mcontent">{content}</div>
I added the modules for multiple content and changed the template to:

Code: Select all

<div class="mcontent">
<div class="boxhead">{content block="Title"}</div>
<div class="boxcontent">{content block="Main Content"}</div>
</div>
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....

Re: Additional Content Modules

Posted: Fri Mar 04, 2005 2:22 am
by sjg
Interesting. I left my original {content} tag alone, but added a {content block="other"}, and TinyMCE worked correctly for me.

Re: Additional Content Modules

Posted: Fri Mar 04, 2005 2:32 am
by Greg
The source code with TinyMCE active shows the initilization of TinyMCE as:

Code: Select all

tinyMCE.init({
				mode : "exact",
				elements : "content_en, Title, Main_Content",
and the textareas are properly identified as:

Code: Select all

<textarea id="Title" name="Title" cols="80" rows="15">
<textarea id="Main_Content" name="Main_Content" cols="80" rows="15">
but with either WYSIWYG editor active the textarea from the old template definition still appears:

Code: Select all

<textarea id="content_en" name="content_en" cols="80" rows="20">

Re: Additional Content Modules

Posted: Mon Apr 11, 2005 11:34 pm
by amo
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

Re: Additional Content Modules

Posted: Wed Apr 13, 2005 7:53 am
by Akrabat
amo: Which version of cms made simple are you using?

Re: Additional Content Modules

Posted: Wed Apr 13, 2005 9:45 am
by Ted
He posted this twice.  He was using an older version.

Re: Additional Content Modules

Posted: Fri Apr 15, 2005 4:26 pm
by Lohengrin
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

Posted: Fri Apr 15, 2005 4:38 pm
by Ted
It's in the beta and should be used like it's discussed above.

Re: Additional Content Modules

Posted: Tue May 03, 2005 3:27 am
by amo
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

Re: Additional Content Modules

Posted: Mon May 23, 2005 4:58 pm
by Ted
How did you insert the {content} tag into the template?

Re: Additional Content Modules

Posted: Mon Jun 13, 2005 11:37 am
by fadum
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

Re: Additional Content Modules

Posted: Mon Jun 13, 2005 11:50 am
by Ted
You're getting it on preview or the actual page?

Re: Additional Content Modules

Posted: Mon Jun 13, 2005 11:56 am
by fadum
actual pages

0.10 beta3