Hello,
this should be an easy question. I am trying to find a way to access variables out of the current { block } in fusion, but I don’t know where to look to find the right syntax. As an example, in the following code block :
// This is the default page configuration
prototype(Vendor.Site:Page) < prototype(Page) {
templatePath = 'resource://Vendor.Site/Private/Templates/Page/Default.html'
head {
stylesheets.site = Neos.Fusion:Template {
templatePath = // I want the templatePath from above declaration here
sectionName = 'stylesheets'
}
javascripts.site = Neos.Fusion:Template {
templatePath = // Also here
sectionName = 'headScripts'
}
}
}
So, I have multiple templatePath variables in that block and I want to declare their value only once and then grab it from that declaration when needed.
I found out that I can declare @context.templatePath and then get its value with ${templatePath}, but is this the best practice ? Also, where can I find some documentation and examples of usage about all these magic variables / functions ?
Thanks in advance !