hallo
for improve seo option i would like to include in the title of the news also Category news
in cms news detail template i have:
{assign var='pagetitle' value=$entry->title}
in template page i have:
<title>{if isset($pagetitle)}{$pagetitle} - {sitename} {/if}</title>
now the page title is some this
TF 12 - TbyF - Tappi per batterie
I would like to get
TF 12 - TAPPI SFOGATOI A FILETTO M12, M18 - TbyF - Tappi per batterie
thanks in advance for the help
[SOLVED] add category on news title
[SOLVED] add category on news title
Last edited by giapippo on Fri Feb 27, 2015 5:41 pm, edited 1 time in total.
Re: add category on news title
From the sample detail template:
So now you only need to figure out how to assign that to a the pagetitle variable. If you need advice on that tell us how exactly the string should be build.
So you can get the category name by using:
====
news_article Object Reference
====
Members:
--
Members can be displayed by the following syntax: {$entry->membername} or assigned to another smarty variable using {assign var='foo' value=$entry->membername}.
The following members are available in the entry array:
...
category (string) = The name of the category that this article is associated with.
Code: Select all
{$entry->category}Re: add category on news title
thank you
the solution was simple and I am confused unnecessarily
thanks
the solution was simple and I am confused unnecessarily
thanks


