Page 1 of 1

[SOLVED] Title news detail page

Posted: Thu Jul 24, 2014 1:54 pm
by giapippo
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

Re: Title news detail page

Posted: Thu Jul 24, 2014 3:16 pm
by velden
Do you set $pagetitle in News Detail Template? Because that's required in this case.

Example:

Code: Select all

{assign var='pagetitle' value=$entry->title}

Re: Title news detail page

Posted: Thu Jul 24, 2014 8:11 pm
by giapippo
;D
thanks

Re: Title news detail page

Posted: Fri Jul 25, 2014 8:43 am
by giapippo
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

Re: Title news detail page

Posted: Fri Jul 25, 2014 8:48 am
by velden
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':
and news detail page

Re: Title news detail page

Posted: Fri Jul 25, 2014 9:03 am
by giapippo
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>

Re: Title news detail page

Posted: Fri Jul 25, 2014 9:14 am
by giapippo
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' />

Re: Title news detail page

Posted: Mon Jul 28, 2014 8:39 am
by giapippo
ok all work fine
thanks

Re: [SOLVED] Title news detail page

Posted: Wed Jul 30, 2014 1:18 am
by Dr.CSS