[TYPO3-english] tt_content.menu.default display name first level parent page
bernd wilke
t3ng at bernd-wilke.net
Fri Feb 7 12:32:16 CET 2014
Am 07.02.14 11:32, schrieb Muriel le Pair:
> bernd wilke schreef op 06-02-14 15:02:
>> either I would use a userfunc which might return the title in an easy
>> ways.
>> or build up a complex typoscript with conditions abiout the current
>> treelevel to decide how many steps upward I need to use wrap.cObject =
>> RECORD.
>>
>> http://stackoverflow.com/questions/19835797/typo3-parent-page-field-for-title-in-typolink
>>
>
> That would require the possibility to retrieve the treelevel of the
> selected page. I have searched but couldn't find something like that.
> The only option I could think of a to do a query on the parentpage.
> Check if it's uid is a section, and if not do another and another and
> another. What potentially would result in a lot of queries.
treelevel would be a TS-condition. or in this case it would be a set of
TS-conditions:
[treeLevel = 2]
// section just above
:
[global]
[treeLevel = 3]
// section two levels above
:
[global]
[treeLevel = 4]
// section three levels above
:
[global]
with each level more the selection of parentpage would need a further
iteration.
and this would result in a very big TS with a lot of duplicate code.
so it is much easier to get the title with an userfunc.
> So I decided that the BE editors will just need to add the sectionname
> as a subtitle.
editors might be the cheapest work, but do they work like a (verified)
program? ;-)
bernd
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-english
mailing list