What does Description (title attribute) do?

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
giggler
Forum Members
Forum Members
Posts: 197
Joined: Tue Oct 09, 2007 7:08 am

What does Description (title attribute) do?

Post 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}
cyberman

Re: What does Description (title attribute) do?

Post 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
giggler
Forum Members
Forum Members
Posts: 197
Joined: Tue Oct 09, 2007 7:08 am

Re: What does Description (title attribute) do?

Post 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}
alby

Re: What does Description (title attribute) do?

Post 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
MarkFresh

Re: What does Description (title attribute) do?

Post 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
Last edited by MarkFresh on Wed Jul 22, 2009 11:17 am, edited 1 time in total.
dmaireroa
Forum Members
Forum Members
Posts: 110
Joined: Wed Jul 15, 2009 12:35 am

Re: What does Description (title attribute) do?

Post by dmaireroa »

Thanks Mark, you made it so much easier for someone like me  ;)

CHEERS :)
Post Reply

Return to “CMSMS Core”