[TYPO3-english] Flexible menu starting points
Pero Peric
pperic at mail.com
Thu Jul 24 20:00:51 CEST 2014
On 24.7.2014. 19:38, JoH asenau wrote:
>>> Actually the purpose of the first menu is, to walk up the rootline from
>>> the root to the current page and always write the uid to the register,
>>> when the checkbox is set. So the uid of last page with an activated
>>> checkbox should be registered in the end.
>>
>> So, i suppose when if clause is true it should stop from going on
>> further the rootline?
>
> No - since it will walk down the full rootline, but only write the uid
> to the register when the checkbox is set.
>
>> Hm, i tried with COA_INT now but it's the same. I'm not sure how to
>> debug this so i wrote it like this.
>>
>> menu_s = COA
>> menu_s {
>> 10 = HMENU
>> 10 {
>> special = rootline
>> special.range = 0 | -1
>> 1 = TMENU
>> 1.NO {
>> allWrap= You are here: | > |*| | >
>> |*| |
>> doNotLinkIt = 1
>> stdWrap.cObject = LOAD_REGISTER
>> stdWrap.cObject {
>> mystartingpoint.field = uid
>> mystartingpoint.if.isTrue.field = tx_menurootpoint_menuroot
>> }
>> }
>> }
>> 20 = TEXT
>> 20.data = register:mystartingpoint
>> }
>>
>>
>> and then i use marker to print value in menu_s.20. When i'm on the page
>> that has checkbox set it prints pageID but when i'm on the page that has
>> no chechbox set it prints nothing.
>>
>> I also noticed that when i use strWrap.cObject as you wrote originaly i
>> don't get page names printed out. If i use before.cObject or
>> after.cObject i get those names printed. Do u have maybe some hint for
>> easier method of debugging this? Thx!
>
> stdWrap will replace the title of the page completely, which is what you
> need since you don't want output but just a register to be filled.
>
> So it seems that the registered value gets overwritten even though if
> returns false. (which IMHO is a bug) So you will have to reassign the
> registered value to the register before overriding it.
>
> stdWrap.cObject = LOAD_REGISTER
> stdWrap.cObject {
> mystartingpoint.data = register:mystartingpoint
> mystartingpoint.override {
> field = uid
> fieldRequired = tx_menurootpoint_menuroot
> }
> }
Wow, it seems this works! Man u're ultimate guru of TS. I don't know why
but i find this TS extremely confusing. I didn't have such problems with
any programming language. Hope one day i will get it :-( However thx.
for helping people like me that are lost in TS universe!
Regards.
More information about the TYPO3-english
mailing list