[TYPO3-english] override if on menu object
Mikel
lists at con-version.com
Sun Nov 15 18:14:58 CET 2015
Hi all,
I want to render a section menu with a fluid template when several
conditions are true.
Therefor I added two new fields as boolean to the database:
1. name_of_field_1
2. name_of_field_2
Now I want to render the section menu (menu type = 3) with fluid if one
of the two new fields are true.
So I would need an or condition and and override on the cObject.
I tried that way, but without result:
# First, I copy the menu object to a temporary object to attach the
original cObject if no override should be done
tmp.menuObject < tt_content.menu.20
tmp.myOverride = COA
tmp.myOverride {
10 = TEXT
10.value = this has been overwritten
}
# then I override the menuobject into a COA to proove conditions
tt_content.menu.20 = COA
tt_content.menu.20 {
# now I attach the original resource again
10 < tmp.menuObject
10.override < tmp.myOverride
10.override.if {
isTrue.field = name_of_field_1
}
}
The result is, that the original resource is rendered. So my if
condition seems not to match.
Questions:
Can I override the rendering of a menu type into a fluid template?
Can I check more then just one field in the override condition with "or"?
Thanks in advance
Mikel
More information about the TYPO3-english
mailing list