[solved] Problems with the content tag

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
billthefish
New Member
New Member
Posts: 6
Joined: Thu Dec 08, 2011 11:37 pm

[solved] Problems with the content tag

Post 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
Last edited by billthefish on Wed Dec 21, 2011 10:26 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Problems with the content tag

Post 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}"...
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Problems with the content tag

Post 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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
billthefish
New Member
New Member
Posts: 6
Joined: Thu Dec 08, 2011 11:37 pm

Re: Problems with the content tag

Post by billthefish »

Thanks Rolf. Simple answer that I'm surprised I didn't think of myself. Too little sleep I guess...
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: [solved] Problems with the content tag

Post by Rolf »

No problem ;) Have fun with CMSMS

Grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “CMSMS Core”