typo3 - Prevent TypoScript from cascading? -


i have in every project: typoscript cascades child nodes in pagetree default. if want prevent being applied child nodes, 1 solution create ts template undoes , include "template on next level".

e.g. want apply ts specific parent page, not it's children:

temp.somemenu.wrap = **|** 

apart "template on next level" approach, solutions/hacks include:

if know level start from:

[treelevel = 2]   temp.somemenu.wrap = **|** [global] 

if have pid , want wire in constant:

[page|uid = {$targetpagepid}]   temp.somemenu.wrap = **|** [global] 

edit: adapted constant – quite robust solution!

isn't there switch make ts setting not cascade? or define number of levels can cascade to?

something like

<include_typoscript: source="path/to/my.ts" treelevelsdown="0"> 

or

[global treelevelsdown = 0]   temp.somemenu.wrap = **|** [global] 

this mean ts kind of self-aware, knowing on tree level has been set. not sure if that's possible.

does make sense?

or missing existing solution?

no, not work other way mentioned in question. reason is, typo3 start page , looks upwards page tree, until finds typoscript template. (it collects extension templates on way , applies them on top of first found root template).

therefore never goes down, up. if stop cascading after level, should used typoscript template sites? still needs configuration render page.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -