that works fine in Jamaica. thank you guycalguy1000 wrote: Actually, this is a variation on another example I wrote on how to display the article template, but it's very useful to know that you can change the title area of a detail page, when using the 'detailpage=' parameter of the news or any other module. Here it is in just a few simple steps:
1) Modify your news detail templates and add this line:2) Capture your page content in a variableCode: Select all
{assign var='detail_title' value=$entry->title}
a) Add this code into the section of your page template:b) Replace the {content} tag lower in your template with {$captured_content}Code: Select all
{capture assign='captured_content'}{content}{/capture}
3) Replace the title section of your page template to look something like this:Code: Select all
{if isset($detail_title)} <title>{sitename} - {$detail_title}</title> {else} <title>{sitename} - {title}</title> {/if}
Showing the News Article Title in the title when using the detailpage parameter.
Re: Showing the News Article Title in the title when using the detailpage parameter.
Re: Showing the News Article Title in the title when using the detailpage parameter.
thanks a lot for your feedback 
I'll engage my self with 1.4.1 "Spring Garden"
ciao
gp

I'll engage my self with 1.4.1 "Spring Garden"
ciao
gp
Re: Showing the News Article Title in the title when using the detailpage parame
yes, go gor it, msg me if you have problems
Re: Showing the News Article Title in the title when using the detailpage parameter.
This is brilliant. Thanks, calguy. 

Re: Showing the News Article Title in the title when using the detailpage parameter.
Whats the way to do this for 1.5.1?
Re: Showing the News Article Title in the title when using the detailpage parameter.
That is what I'm trying to figure out now. I tried calguy's method but to no avail. I like alby's method but it seems like there should be less to it. I don't understand why you can't just assign a var to it and then refer to it in the title if it's set. If I figure out an alternative method, I will post it up.cb2004 wrote: Whats the way to do this for 1.5.1?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Showing the News Article Title in the title when using the detailpage parameter.
Read my blog article here:
http://calguy1000.com/Blogs/4/60.html
http://calguy1000.com/Blogs/4/60.html
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Showing the News Article Title in the title when using the detailpage parameter.
Hi,
I tried Calguy's method taken from his website.
But when I add this in my head section:
I get this error (with debug: true):
string(109) "Smarty error: [in tpl_head:22 line 11]: syntax error: unexpected {else} (Smarty_Compiler.class.php, line 478)" string(129) "Smarty error: [in tpl_head:22 line 18]: syntax error: unclosed tag \{else} (opened line 9). (Smarty_Compiler.class.php, line 317)"
Notice: Undefined property: CMS_Compiler::$_plugins_code in C:\internet\wamp\www\labneuro\lib\smarty\Smarty.class.php on line 1495
Do I have something not install correctly? I'm using 1.5.1-mle.
Thanks
Mel
I tried Calguy's method taken from his website.
But when I add this in my head section:
Code: Select all
{if isset($pagetitle)}
<title>{$pagetitle} | {sitename}</title>
{else}
<title>{title} | {sitename}</title>
{else}
I get this error (with debug: true):
string(109) "Smarty error: [in tpl_head:22 line 11]: syntax error: unexpected {else} (Smarty_Compiler.class.php, line 478)" string(129) "Smarty error: [in tpl_head:22 line 18]: syntax error: unclosed tag \{else} (opened line 9). (Smarty_Compiler.class.php, line 317)"
Notice: Undefined property: CMS_Compiler::$_plugins_code in C:\internet\wamp\www\labneuro\lib\smarty\Smarty.class.php on line 1495
Do I have something not install correctly? I'm using 1.5.1-mle.
Thanks
Mel
Version 1.6-MLE
Re: Showing the News Article Title in the title when using the detailpage parame
If what you pasted is exactly what is in your template you are missing somethings...
Too many {else} w/o another statement after last one, no {/if}...
Too many {else} w/o another statement after last one, no {/if}...
Re: Showing the News Article Title in the title when using the detailpage parameter.
It didnt work in 1.4.1 Spring garden 

Re: Showing the News Article Title in the title when using the detailpage parameter.
Hi again. Is there any way to work in 1.4.1???
Re: Showing the News Article Title in the title when using the detailpage parame
Yes it works as it supposed to in 1.4.1, you just have to make sure you have it coded correctly...
Re: Showing the News Article Title in the title when using the detailpage parameter.
Make sure process_whole_template is set to false in the config.php file.
-
- Power Poster
- Posts: 424
- Joined: Sat Feb 02, 2008 12:42 am
Re: Showing the News Article Title in the title when using the detailpage parameter.
For this to work for me, I had to change:
{if isset($pagetitle)}
{$pagetitle} | {sitename}
{else}
{title} | {sitename}
{else}
to:
{if isset($pagetitle)}
{$pagetitle} | {sitename}
{else}
{title} | {sitename}
{/if}
{if isset($pagetitle)}
{$pagetitle} | {sitename}
{else}
{title} | {sitename}
{else}
to:
{if isset($pagetitle)}
{$pagetitle} | {sitename}
{else}
{title} | {sitename}
{/if}
Take a penny, leave a penny.
Re: Showing the News Article Title in the title when using the detailpage parame
Ziggywigged
Where did you get first code that had to be changed, and yes you can't leave the {/if} out or have an {else} w/o something for it...
Where did you get first code that had to be changed, and yes you can't leave the {/if} out or have an {else} w/o something for it...