[TYPO3-english] Typoscript add class to the first element using stdWrap
Arun Chandran
arunchandran2010 at gmail.com
Mon Jun 15 10:14:55 CEST 2015
Hi Guys,
I've a custom requirement to display an image slider using typoscript. The
images are taken from default tt_content image content element.
I've added the following typoscript code to implement this;
lib.homeslider = COA
lib.homeslider {
10 = CONTENT
10 {
table = tt_content
select {
where = colPos = 3
andWhere = deleted = 0
andWhere = hidden = 0
orderBy = rand()
}
renderObj = FILES
renderObj {
references {
table = tt_content
fieldName = image
}
renderObj = IMAGE
renderObj {
file.import.data = file:current:uid
file.treatIdAsReference = 1
stdWrap.typolink.parameter.data = file:current:link
stdWrap.wrap = <div class="item active">|</div>|*|<div
class="item">|</div>|*|<div class="item">|</div>
}
}
}
wrap = <div id="carousel-example-generic" data-ride="carousel"
class="carousel slide carousel-fade"><div role="listbox"
class="carousel-inner">|</div></div>
}
This displayed the images in frontend. But my requirement is I want to add
class "active" to the first image wrapper. I've added the following code to
implement this, but not working.
stdWrap.wrap = <div class="item active">|</div>|*|<div
class="item">|</div>|*|<div class="item">|</div>
If anybody knows the solution, then please help me.
Thanks in advance,
Arun Chandran
PIT Solutions Pvt Ltd.
More information about the TYPO3-english
mailing list