Elxis CMS Forum

Support => Technical support => Topic started by: Luca on February 13, 2012, 16:05:50

Title: Pulling out the Page Title
Post by: Luca on February 13, 2012, 16:05:50
Hi,

I need to pull out dynamically the actual page title in order to use it in some tags, but it seems I didn't found any forum' thread nor I managed to find how to seeking in the files.

Instead of this
$mainframe->getCfg('sitename')

something like
$mainframe->getCfg('page_title') or $mainframe->getCfg('item_title')

but any of them work...

Please, any advice?

Thanks
Title: Re: Pulling out the Page Title
Post by: webgift on February 13, 2012, 18:28:45
Hi baghetta, Try :
echo $mainframe->getPageTitle(); // In case that this will be used at index.php file of your template.
In any other function you should call the maiframe global variable like:
global mainframe;
echo $mainframe->getPageTitle();
Title: Re: Pulling out the Page Title
Post by: Luca on February 13, 2012, 18:31:06
Thank you @webgift, it works ok  :)
Title: Re: Pulling out the Page Title
Post by: webgift on February 13, 2012, 18:32:16
You are welcome ;)