Page 1 of 1
Started getting No Content Given?
Posted: Tue Apr 20, 2010 9:58 pm
by Rabel
Hi Everyone,
I am new to CMSMS and I have been working on the templates for a customer, I was using just content blocks with very Descriptive names like {content block="Project Section 850x500"}. After creating each template then I made a test page and each template worked fine until today when I came in and finished another template and tried to create a page and got this "No Content Given" error. I then tried the old templates i put together and got the same error. If I remove the block="blah blah" from one of the tags then it appears to work ok, but I am not sure why this started all of the sudden when no changes were made and it worked before. I went over a few threads but they only explained to add a basic content tag Few Questions
1. Any Ideas what caused this to happen when it did work?
2. Can I add a {content} that doesnt display in the cms? So I dont have to explain why this is different then the other content sections names and to not enter any information in it
3. Is there any other options around this problem?
I appreciate any help.
Thanks,
Randy
Re: Started getting No Content Given?
Posted: Wed Apr 21, 2010 12:53 am
by Dr.CSS
Sorry you have to have one default content tag {content} in your template, you may be able to use the label parameter to label it as "Don't Use This" but really what's wrong with having one main content block...
Re: Started getting No Content Given?
Posted: Wed Apr 21, 2010 4:15 pm
by Rabel
Thanks Dr. nothings really wrong with that but I wanted to keep everything uniform. Can you tell me why it did work and now it has stopped?
Thanks for the help.
Randy
Re: Started getting No Content Given?
Posted: Sun May 09, 2010 9:10 am
by tkemmere
to Dr.CSS,
I came accross this problem too.
I'm building a site with two templates:
"1 whole" A page with a content block accross the whole width of the page;
"2 halves" A page with a two content blocks each using half the width of the page;
As I was designing the templates, and added the second content block, I saw that the {content block="xyz"} tag also generates a title in the editor. And since the 2 blocks come above oneanother there, I named them "left" and "right"! And then to keep things uniform, I named the single one in 1-whole.tpl "wide". Then the "no content given" error popped up, and I found this thread in the forum.
I suggest to add this bit of knowledge to the Help page of the content tag. It could go like this:
"Each template should contain one {content} tag, while second content blocks can have the block parameter". (I'm willing to add this to the forge, if you think this is appropriate).
Re: Started getting No Content Given?
Posted: Sun May 09, 2010 9:19 am
by tkemmere
PS. Another thing for the help page on the Content tag:
The Label parameter is not listed under What parameters does it take?
But it does take it!
I'm using v1.6.6
Re: Started getting No Content Given?
Posted: Sun May 09, 2010 10:44 am
by RonnyK
I do see the parameter in the help of the tag.
(optional)label - Allows specifying a label for display in the edit content page.
Ronny
Re: Started getting No Content Given?
Posted: Sun May 09, 2010 11:32 am
by tkemmere
Hi Ronny,
I suppose that is due to the version then. If you're using higher than 1.6.6, than this part label remark is no issue.
But I do suggest to put the remark about keeping the default {content} tag in, into the help-page. However I have no experience regarding submitting bug / enhancement suggestions. That is why I mention it here, and let you judge on it. If you find it worthy, I'm happy to submit it.
Regards.
Re: Started getting No Content Given?
Posted: Sun May 09, 2010 11:36 am
by RonnyK
I already put an extra line in the help of the plugin.
No need for the BR for this. I dont recall that it was put in later, dont you see it on the bottom area, just above the UDT logic?
BTW, only last and semi-last (so 1.7.1 and 1.7 now...) are supported.
In the next release, the lang-file will be updated.
Could it be that you run another lang in the backend, which doesnt have the help in?
Ronny
Re: Started getting No Content Given?
Posted: Sun May 09, 2010 12:17 pm
by tkemmere
Re. the extra line: Cool!
Re. the
label: On
http://website/admin/listtags.php?sp_=e ... in=content
I see:
What does this do?
This is where the content for your page will be displayed. It's inserted into the template and changed based on the current page being displayed.
How do I use it?
Just insert the tag into your template like: {content}.
What parameters does it take?
* (optional)block - Allows you to have more than one content block per page. When multiple content tags are put on a template, that number of edit boxes will be displayed when the page is edited.
Example:
{content block="Second Content Block"}
Now, when you edit a page there will a textarea called "Second Content Block".
* (optional)wysiwyg (true/false) - If set to false, then a wysiwyg will never be used while editing this block. If true, then it acts as normal. Only works when block parameter is used.
* (optional)oneline (true/false) - If set to true, then only one edit line will be shown while editing this block. If false, then it acts as normal. Only works when block parameter is used.
* (optional)size - Applicable only when the oneline option is used this optional parameter allows you to specify the size of the edit field. The default value is 50.
* (optional)default - Allows you to specify default content for this content blocks (additional content blocks only).
* (optional)assign - Assigns the content to a smarty parameter, which you can then use in other areas of the page, or use to test whether content exists in it or not.
Example of passing page content to a User Defined Tag as a parameter:
{content assign=pagecontent}
{table_of_contents thepagecontent="$pagecontent"}
« Back to Menu
I'm running 1.6.6 "Bonde", all set to English, never changed.
Cheers.
Re: Started getting No Content Given?
Posted: Sun May 09, 2010 4:53 pm
by RonnyK
I see...
The label-parameter has been added to the help in the 1.7 branch just recently.
Ronny