[Typo3-dev] Retrieving homepage name.

Daniel Pötzinger operation-lan at gmx.de
Thu Jul 8 13:37:20 CEST 2004


"Stig N. Jepsen" <stig at 8620.dk> schrieb im Newsbeitrag
news:mailman.1.1089283562.30673.typo3-dev at lists.netfielders.de...
> Hi,
>
> What would be the correct way to retrieve the name of an homepage.
> Currently I use this global variable:
> $GLOBALS["TSFE"]->rootLine[0]["title"]
>
> But in case that there are more than one homepages in the tree, how do I
> know which one I'm currently at?
>
> /Stig

Hello Stig

Try something with this class. Here is just a copy of a part from my backend
module:
$sys_page = t3lib_div::makeInstance("t3lib_pageSelect");
        $rootLine = $sys_page->getRootLine($this->id);
        $tmpl->runThroughTemplates($rootLine,0);    // This generates the
constants/config + hierarchy info for the template.
        $tmpl->generateConfig();    //Generate
$sys_page = t3lib_div::makeInstance("t3lib_pageSelect");
        $rootLine = $sys_page->getRootLine($this->id);
        $tmpl->runThroughTemplates($rootLine,0);    // This generates the
constants/config + hierarchy info for the template.
        $tmpl->generateConfig();    //Generate






More information about the TYPO3-dev mailing list