[TYPO3-dev] getRootline function not stopping

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Jul 14 12:05:57 CEST 2008


Martin Kutschker wrote: on 11.07.2008 22:06:
> Ernesto Baschny [cron IT] schrieb:
>> Dmitry Dulepov [typo3] wrote: on 09.07.2008 15:45:
>>> Hi!
>>>
>>> Martin Kutschker wrote:
>>>>> If you are in Frontend, you can actually use
>>>>> $GLOBALS['TSFE']->tmpl->rootLine, which is the rootline for the current
>>>>> web site.
>>>> I don't think that this distinction is clear from the inline docs.
>>>> Needless to say that having an isRoot-flag both in the page and the
>>>> template records doesn't make things easier. *
>>> I absolutely and fully agree.
>>>
>>>> * Is it somewhere stated what these flags actually do and why there are
>>>> two of them?
>>> Not really. I think "Is site root?" in page properties was created to
>>> avoid searching for root TS template in some functions.
>> The flag is used:
>>
>> - in "sliding" functions (to stop the sliding),
>> - typolink uses it to stop looking for a domain record.
>> - also it is used by the page-tree (in BE) to put the "domain name"
>> besides the page title in case options.pageTree.showDomainNameWithTitle
>> is set.
>> - for TCA methods that can substitute the marker "###SITEROOT###", this
>> is the flag that is checked for this.
>>
>> AFAIK these are the only parts where is_siteroot is used, besides the
>> mentioned RealURL part.
> 
> Besides the fact, that a template could include a template with the
> is-root-flag set, could the flag in the template be obsoleted like the
> page types advanced and not-in-menu? Here we have the same thing: two
> options with the same (?) meaning.

Yes, that is indeed a bit annoying, but probably have some technical 
reasons and are difficult to change. Setting that in a TypoScript 
template has the reason that the "levels" defined in that template are 
then always calculated correctly from that starting point (for menus, etc).

Usually all BE-stuff uses the page is_root flag, while the FE uses the 
root sys_template flag (because TS will be parsed anyway) to determine 
the "current site root". RealURL is an exception, because it has to get 
the root before the TypoScript is parsed.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list