Page 1 of 1

[solved] Problems with the content tag

Posted: Wed Dec 21, 2011 1:30 am
by billthefish
I thought I has this licked and removed my last post but I guess I jumped the jumped the gun.

I'm trying to use the {content} tag in my template to assign the page content to a variable per the documentation in the form of:
{content assign=pagecontent}

Now when I try to edit any page that have that template assigned I get the following error:
An error occurred parsing content blocks (perhaps duplicated block names)

I can't edit the page content when this error shows up.

Here's how I'm using the tag in the template

Code: Select all

{content assign=pagecontent}
... a bunch of template code ...
{content}
... the rest of the template code ...
CMSMS version: 1.10.2
PHP version: 5.3.5

Re: Problems with the content tag

Posted: Wed Dec 21, 2011 2:41 am
by Dr.CSS
You get an error because as far as the system is concerned you have two {content} calls, when you assign= you have to use the assigned variable to call the "{content}"...

Re: Problems with the content tag

Posted: Wed Dec 21, 2011 10:20 am
by Rolf
billthefish wrote:I'm trying to use the {content} tag in my template to assign the page content to a variable

Code: Select all

{content assign=pagecontent}
Tag in the template to output the content would be

Code: Select all

{$pagecontent}
And a second one
{content block="secondcontent" assign="secondcontent"}
And
{$secondcontent} to display it

Hope this helps

Rolf

Re: Problems with the content tag

Posted: Wed Dec 21, 2011 10:25 am
by billthefish
Thanks Rolf. Simple answer that I'm surprised I didn't think of myself. Too little sleep I guess...

Re: [solved] Problems with the content tag

Posted: Wed Dec 21, 2011 11:17 am
by Rolf
No problem ;) Have fun with CMSMS

Grtz. Rolf