Hello everyone
I have a strange problem with the page titles news
the problem is not 'never occurred in the other sites I've made
for example this web page
http://www.maxoro.it/news/13/58/Rolex-Submariner
does not have the correct title.
in the template of the detail page news use this string
<title>Orologio {if isset($pagetitle)}{$pagetitle}{else}{/if} usato o di secondo polso a Mantova</title>
but the page title " ROLEX SUBMARINER " not loaded
I used this code on other sites and it has always worked
I do not understand
thanks
[SOLVED] Title news detail page
[SOLVED] Title news detail page
Last edited by giapippo on Mon Jul 28, 2014 8:40 am, edited 3 times in total.
Re: Title news detail page
Do you set $pagetitle in News Detail Template? Because that's required in this case.
Example:
Example:
Code: Select all
{assign var='pagetitle' value=$entry->title}
Re: Title news detail page
Unfortunately, something is not right
the actual title of the page is this:
OMEGA SPEEDMASTER PROFESSIONAL
but the page automatically takes this
<title> Rolex Submariner used or second pulse in Mantua </ title>
unfortunately 'but the system takes an OMEGA ROLEX
page template
<title>Orologio {if isset($pagetitle)}{$pagetitle}{else}{/if} usato o di secondo polso a Mantova</title>
and news detail page
{assign var='pagetitle' value=$entry->title}
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
<div id="page-title">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall} </h2>
</div>
</div>
</div>
</div>
because the title is crazy
thanks
the actual title of the page is this:
OMEGA SPEEDMASTER PROFESSIONAL
but the page automatically takes this
<title> Rolex Submariner used or second pulse in Mantua </ title>
unfortunately 'but the system takes an OMEGA ROLEX
page template
<title>Orologio {if isset($pagetitle)}{$pagetitle}{else}{/if} usato o di secondo polso a Mantova</title>
and news detail page
{assign var='pagetitle' value=$entry->title}
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
<div id="page-title">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall} </h2>
</div>
</div>
</div>
</div>
because the title is crazy
thanks
Re: Title news detail page
Sorry, but I don't understand what you're trying to say or ask.
Note: make sure to be clear about using a 'page (template)' or a 'module template':
Note: make sure to be clear about using a 'page (template)' or a 'module template':
and news detail page
Re: Title news detail page
ok
news model Detail in news section
{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{assign var='pagetitle' value=$entry->title}
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
<div id="page-title">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall} </h2>
</div>
</div>
</div>
</div>
template for Default page to use for detailed views news
<title>Orologio {if isset($pagetitle)}{$pagetitle}{else}{/if} usato o di secondo polso a Mantova</title>
news model Detail in news section
{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{assign var='pagetitle' value=$entry->title}
{if isset($entry->canonical)}
{assign var='canonical' value=$entry->canonical}
{/if}
<div id="page-title">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall} </h2>
</div>
</div>
</div>
</div>
template for Default page to use for detailed views news
<title>Orologio {if isset($pagetitle)}{$pagetitle}{else}{/if} usato o di secondo polso a Mantova</title>
Re: Title news detail page
I may have solved this inserndo head that I took from a site that I had developed a month ago
{strip}
{process_pagedata}
{* With cms_lang_info we retrieve current language information, assign gives us $nls variable we can work with *}
{cms_lang_info assign='nls'}
{* using strip as we don't want useless whitespace, especially not before doctype *}
{/strip}<!doctype html>
<__html lang='{$nls->htmlarea()}' dir='{$nls->direction()}'>
<head>
<title>{if isset($pagetitle)}{$pagetitle}{else}{sitename} - {sitename} - {title}{/if}</title>
{metaog key_number=12 key_density=2 desc_length=300 pagedetail=81}
<meta charset='{$nls->encoding()}'>
<meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0 user-scalable=no' />
<meta name='HandheldFriendly' content='true' />
{strip}
{process_pagedata}
{* With cms_lang_info we retrieve current language information, assign gives us $nls variable we can work with *}
{cms_lang_info assign='nls'}
{* using strip as we don't want useless whitespace, especially not before doctype *}
{/strip}<!doctype html>
<__html lang='{$nls->htmlarea()}' dir='{$nls->direction()}'>
<head>
<title>{if isset($pagetitle)}{$pagetitle}{else}{sitename} - {sitename} - {title}{/if}</title>
{metaog key_number=12 key_density=2 desc_length=300 pagedetail=81}
<meta charset='{$nls->encoding()}'>
<meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0 user-scalable=no' />
<meta name='HandheldFriendly' content='true' />