[TYPO3-english] TemplaVoila: Background of "container for element"
jaco graaff
jaco at spacexplorer.co.za
Thu Oct 6 01:12:52 CEST 2011
Hi Victor - sorry if my code in the email was confusing - I double-checked
and I referred to the field correctly
It seems no matter what typoscript I type in the typoscript-node on the CO -
(container of elements) - it has no effect
For EL (Elements) or AT (Attributes) or NO (Not-Mapped), it's fine
I can get values from fields and manipulate their target elements with
typoscript
I tried to run the following simple tests in the typoscript-node of the CO
CO
--- SC
------ CO (this is the CO I am targeting)
---------- EL
---------- EL
---------- EL
---------- AT
---------- AT
---------- NO
##-------------------------------------------------------------------------------------------------------------------------------------
<TypoScript>
<![CDATA[
<TypoScript>
<![CDATA[
## I tried lot's of things blindly...
## just to see if ANY typoscript can be executed on the CO
renderObj = COA
renderObj {
10 = TEXT
10.field = field_background ##this is referal to the node for selecting the
image
10.wrap = background-image:url(/uploads/tx_templavoila/|)
}
##OR
/*
renderObj = COA
renderObj {
10 = TEXT
10.field = field_background ##this is referal to the node for selecting the
image
10.wrap = <div> just test anything in here</div>|
}
*/
## it's already inside a COA - try....
10= RECORDS
10.source.current=1
10.tables = tt_content
10.stdWrap.wrap = <div class="someClass">xxx | xxx</div>
10.stdWrap.if {
isTrue.field = field_contenttop
}
##OR
10 = TEXT
10.field = yyy
10.wrap = <div> just test anything in here</div>|
##OR
wrap = <div> just test anything in here</div>|
##OR - this works in an EL and replaces the whole EL
10 = TEXT
10 {
value = ggg
wrap = x|x
}
]]>
</TypoScript>
##-------------------------------------------------------------------------------------------------------------------------------------
My temporary solution is to create a new DIV via typoscript from one of the
other EL's typoscript-node and then put the background in there - as long as
this div is rendered at the bottom layer it's fine - I can live with the
extra DIV - although I still would have liked to rather manipulate
properties (like background) on the parent/containing DIV
##----------------
10 = TEXT
10.field = field_background
10.wrap = <div class="infoPanelBackground"
style="background-image:url(uploads/tx_templavoila/|);
background-repeat:none; background-position: 0px 0px"></div>
20 ##this is the typoscript for this node
##----------------
To make it simpler for myself I then use some javascript to delete the extra
child div and inject the background into the parent DIV - but this again is
client-side UI creation which I always want to limit as much as possible.
I just wish there was clear documentation on this - or that I could
understand it enough to help in providing such documentation
I am able to understand things like the ZEND-Framework, XAML, WPF, C# -
MVVM-framework, name it - because of good documentation - but the lack
thereof in the Open Source community makes it extremely time-consuming and
difficult to break into.
I'll volunteer to help with graphics, scenarios, design-patterns and
illustrations, working through lots of potential scenarios to better explain
the extend of the usage of things like this because I am passionate about
typo3.
The problem is there are basic examples and as soon as you deviate from that
you are stuck and spend countless hours blindly trying things out.
I found one example of a discussion on changing the background color on a
CO - but I do not know if this relally was a CO or just an EL-DIV that the
poster refered to as a Container. Also in My case it is a CO of a repeating
object.
I read through countless documents and posts and still don't know if this is
allowed.
I know it will help if I spend a lot more time and try and de-code the
underlying classes and logic of this implementation - but I simply do not
have that time currently. Also - I am a designer with the ability to code -
it takes me a lot longer than a software-engineer to understand the
underlying mechanics of a platform.
More information about the TYPO3-english
mailing list