Page 1 of 1
What does Description (title attribute) do?
Posted: Thu Nov 08, 2007 5:45 am
by giggler
What does Description (title attribute) do exactly? Is there a way to enter info here and show it between the title tag?
{titleattribute}
Re: What does Description (title attribute) do?
Posted: Thu Nov 08, 2007 7:54 am
by cyberman
It puts out the results of description/title attribute for every page

.
And yes there's a way to do what you want
http://wiki.cmsmadesimple.org/index.php ... escription
Re: What does Description (title attribute) do?
Posted: Fri Nov 09, 2007 6:53 am
by giggler
I've tried putting the following betweent the tag in the template and didn't seem to do anything. I'm using pretty url, so would that cause it not to work?
Code: Select all
{foreach from=$nodelist item=node}
{if $node->current == true}
{$node->titleattribute}
{/if}
{/foreach}
Re: What does Description (title attribute) do?
Posted: Fri Nov 09, 2007 9:44 am
by alby
giggler wrote:
I've tried putting the following betweent the tag in the template and didn't seem to do anything. I'm using pretty url, so would that cause it not to work?
Code: Select all
{foreach from=$nodelist item=node}
{if $node->current == true}
{$node->titleattribute}
{/if}
{/foreach}
No, this code is for MenuManager templates (start from
top of page)
Alby
Re: What does Description (title attribute) do?
Posted: Wed Jul 22, 2009 11:12 am
by MarkFresh
I'll post this as it took my a while to work out, it may help others:
1) Make sure your page has something in the Description (title attribute) field.
2) Create a new template in menu manager
3) Give it a name e.g TitleDescription
4) Enter the code:
Code: Select all
{foreach from=$nodelist item=node}
{if $node->current == true}
{$node->titleattribute}
{/if}
{/foreach}
5) save it
6) add
Code: Select all
{menu template='TitleDescription'}
to the title tag e.g.
Code: Select all
<title> {sitename} {menu template='TitleDescription'} </title>
edited to add - or you could just use {description}
I haven't worked out how to to show {title} if the Description (title attribute) fields is empty. Any help there would be great.
Mark
Re: What does Description (title attribute) do?
Posted: Tue Aug 04, 2009 11:46 am
by dmaireroa
Thanks Mark, you made it so much easier for someone like me
CHEERS
