If I want to use typoscript as creating a menu in a liquid template, I have two possible ways:
use typoscript to populate the variable for the template. doing it as follows:
page.10 = FLUIDTEMPLATE
page.10 {
templateName = index.html
variables {
contentMain < styles.content.get
mainMenu < temp.mainMenu
:
}
}
and in the template just use the variable:
<div class="header">
<div class="logo">{logo->f:format.raw()}</div>
<div class="main-menu">{mainMenu->f:format.raw()}</div>
</div>
another way is to use the f: cObject viewer to invoke the typoscript part.
typoscript:
page.10 = FLUIDTEMPLATE
page.10 {
templateName = index.html
variables {
contentMain < styles.content.get
:
}
}
lib.mainMenu < temp.mainMenu
while the liquid pattern is as follows:
<div class="header">
<div class="logo">{logo->f:format.raw()}</div>
<div class="main-menu">
<f:cObject typoscriptObjectPath="lib.mainMenu />
</div>
</div>
So. My question is: what are the pros and cons of each?
Are there differences for different versions of TYPO3?
source
share