[solved] Template causes "No content given" error when adding new content

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Stom
Forum Members
Forum Members
Posts: 82
Joined: Tue Jul 31, 2007 1:41 am

[solved] Template causes "No content given" error when adding new content

Post by Stom »

I've just installed a new copy of CMSMS, ver 1.6.6. I have a template with two content blocks, see code below:

Code: Select all

<div id="content">
	<div id="right-column">
		<div id="search">
			{search}
		</div>
		{content block='Content'} (I've also tried block='content', same result.)
	</div>
		
	<div id="left-column">
		{content block='leftcolumn'}
	</div>
</div>
I've set this as the default template. If I try to add a new page with this selected as the template I get the error "No content given!". If I choose another template it works. Then I can change to my desired template and it works. Why whould this happen?

Thanks in advance.
Last edited by Stom on Thu Oct 08, 2009 7:04 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: Template causes "No content given" error when adding new content

Post by RonnyK »

Make the first one just {content}.... Only additional blocks are requiring a name. And {content} should always be there as some modules rely on that.

Ronny
Stom
Forum Members
Forum Members
Posts: 82
Joined: Tue Jul 31, 2007 1:41 am

[solved] Re: Template causes "No content given" error when adding new content

Post by Stom »

Brilliant, that worked a treat. Thank you.

It also solved some issues I was having with the Products module.
Post Reply

Return to “Layout and Design (CSS & HTML)”