[TYPO3-english] Flexible menu starting points
JoH asenau
info at cybercraft.de
Thu Jul 24 19:38:54 CEST 2014
>> 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
}
}
HTH
Joey
--
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
More information about the TYPO3-english
mailing list