I have a simple back-end module, where you can switch between or create new "themes" . For the sake of simplicity, let's say that the model contains only a logo and a color code. In my typoscript setup I'm using the following code to get the items from the DB:
temp.theme= CONTENT
temp.theme{
select{
...
}
renderObj = COA
renderObj {
#theme color
10 = TEXT
10.field = color
...
#theme logo
40 = FILES
40{
references {
...
}
renderObj = IMAGE
renderObj {
wrap = <div class="logo">|</div>
file.import.data = file:current:originalUid
}
}
}
}
How can i split this object into variables? This won't work, but i guess it is a good representation of what i'm trying to achieve:
lib.logo = COA
lib.logo < temp.theme.renderObj.40
Also I want to set the color as following (obviously this won't work either):
page.cssInline.1010 < temp.theme.renderObj.10
Is there a better way to achieve what I'm trying to do? What is working so far for me is to copy this object, then unset what i'm not using:
temp.logo = COA
temp.logo{
10 < temp.theme
10.renderObj.10 >
...
#10.renderObj.40 >
...
}
I'm sure that there is a simpler way, but i couldn't find it.