[TYPO3-english] Flexible menu starting points

Pero Peric pperic at mail.com
Tue Jul 22 22:42:39 CEST 2014


On 22.7.2014. 22:05, JoH asenau wrote:
>> special.value.field = checkbox_value // parent_page_checkbox_value //
>> grandparent_page_checkbox_value // grandgrandparent_page_checkbox_value
>>
>> So, if checkbox value on J page is null then check value of checkbox on
>> page G (parent). If that one is also null then check grandparent
>> checkbox value on page F. If that one is null then check one on page C.
>> Number of level would be fixed, for example to 4.
>>
>> If this idea is not too stupid how can i get field values from parent
>> page levels? Thx!
>
> What you want is called "levelfield" and is part of the getText methods
> of the data property.
>
> special.value.data = levelfield:-1, myfieldname, slide
>
> levelfield says: I want to check a field in the rootline of the current
> page
>
> You can have positive values, which would be counted as static levels
> starting at the root page. So levelfield:2 would be starting at level 2.
> But you can use negative values as well, which would be counted as
> relative levels backwards from the current page. So -1 would be the
> current page, -2 the parent and so on.
>
> Then you have to name the field you want to check. Additionally you
> should make sure, it will be added to the so called "rootline fields",
> since the method will be available for registered fields only. You can
> do so in the appropriate section of the install tool.

So, there is something like register rootline fields in Install tool? 
Can you give some more hints where to look because i never saw this?

> The slide option will make levelfield start at the given level and then
> check for an existing value of that field down the rooltine until a
> value will be found or the root page is reached. Is there a value on
> page J? No? - OK, check page G and so on.

So, if I set levelfield to -1 it will slide to -2,-3 etc., not to 0,1,2..?

> Since it might be possible that there is no value at all, you should use
> a fallback.
>
> special.value.ifEmpty = 123

Wow! Thx. Joey this was really interesting and i will try it.

Regards.



More information about the TYPO3-english mailing list