OK.. I got my story straight now.wishbone wrote: nevermind... I thought I was onto something special... but after I re-read the first post, it ended up that I basically did the same thing and I wasn't really as original as I thought.
Regarding 'process_whole_template', I'm a bit confused about what the first post in this thread says to do, what the config.php says and what I see.
config.php
Code: Select all
# In versions of CMS Made Simple prior to version 1.4, the page template was processed
# in it's entirety. This behaviour was later changed to process the head portion of the
# page template after the body. If you are working with a highly configured site that
# relies significantly on the old order of smarty processing, you may want to try
# setting this parameter to false.
$config['process_whole_template'] = false;
Once I understood how this worked, I did the following, which seems even simpler than what this thread suggests.
Step one: Make sure that $config['process_whole_template'] is false
Step two: insert the following in your news detail template:
Code: Select all
{assign var='news_title' value=$entry->title}
Step three: Replace your line in your site's template with:
Code: Select all
{if isset($news_title)}
<title>{sitename} - {$news_title}</title>
{else}
<title>{sitename} - {title}</title>
{/if}
Wasn't the 'process body before head' mode designed for something like this in mind? If so, why does all the threads that I find suggest capturing content in the head when I can do it my way instead? (capturing the title in the news template, and using this variable in the head).. Is there something fundamentally wrong with my method?
Sorry for the rant...... But I'm happy that I found a simple solution. and learned something in the process.
My hurts. :-\