Elijah Lofgren

I follow Jesus Christ and enjoy talking with people, taking pictures, reading, writing, helping people, and making websites. Who is Jesus?

My life mission: "Whatever you do, do it all for the glory of God." - 1 Corinthians 10:31

You are here: Home » CMS Made Simple Tips » CMSMS 1.4 Tip: Easily modify page title

CMSMS 1.4 Tip: Easily modify page title


From: #cms on irc.freenode.net on June 21, 2008
(03:19:01 PM) elijahlofgren: calguy1000: e.g. News title in page title? 
(03:19:11 PM) calguy1000: elijahlofgren: 1.4 makes that easy
(03:19:35 PM) calguy1000: when processing a page template now we split apart the head from the body.... push the body through smarty first, then the head then output $head.$body
(03:19:49 PM) calguy1000: so you can set any smarty variable in any detail template, and use it in the head
(03:20:05 PM) calguy1000: or in content, or in a summar template... blah blah
(03:22:06 PM) calguy1000: so now in a news detail template you can simply do a {assign var='mytitle' value=$entry->title}
(03:22:44 PM) calguy1000: then in your head.... {if isset($mytitle)}<title>{$mytitle}</title>{else}<title>{title} - {sitename}</title>{/if}
(03:25:43 PM) calguy1000: and module template modification times are cached in memory now.... so it's alot faster to load module templates