[TYPO3-UG Dutch] ad random content elementen pakken
WP Perquin
perquin at yuplounge.nl
Fri Jan 2 12:47:48 CET 2009
GELUKT!!
temp.randomplaatjes = COA_INT
temp.randomplaatjes {
10 = CONTENT
10 {
table = tt_content
select {
# ID of the page where your content elements are stored
pidInList = {$adsdirectorypid}
# Number of content elements to show
max = {$maxamountads}
# als het multilanguage is
# languageField = sys_language_uid
orderBy = rand()
}
renderObj.stdWrap.dataWrap = <div id="testje">|</div>
}
}
-----Oorspronkelijk bericht-----
Van: typo3-ug-dutch-bounces at lists.netfielders.de
[mailto:typo3-ug-dutch-bounces at lists.netfielders.de] Namens WP Perquin
Verzonden: woensdag 31 december 2008 1:48
Aan: 'TYPO3 Usergroup Dutch'
Onderwerp: [TYPO3-UG Dutch] ad random content elementen pakken
Ik heb de volgende typoscript gemaakt om ad random content elementen (in dit
geval plaatjes) uit een page te halen (deze is gevuld met content
elementen)
#random plaatjes plaatsen uit een pagina:
temp.randomplaatjes = COA_INT
temp.randomplaatjes {
10 = CONTENT
10 {
table = tt_content
select {
# ID of the page where your content elements are stored
pidInList = {$adsdirectorypid}
# Number of content elements to show
max = {$maxamountads}
# als het multilanguage is
# languageField = sys_language_uid
orderBy = rand()
}
wrap = <div 1234>|</div>
}
}
Het resultaat:
<div 1234>
<!-- CONTENT ELEMENT, uid:17/image [begin] -->
<a id="c17"></a>
<!-- Image block: [begin] -->
<div class="csc-textpic csc-textpic-center
csc-textpic-above"><div class="csc-textpic-imagewrap"
style="width:102px;"><dl class="csc-textpic-image csc-textpic-firstcol
csc-textpic-lastcol" style="width:102px;"><dt><img
src="uploads/pics/epdm.gif" width="102" height="61" border="0" alt=""
title="advertentie epdm" /></dt></dl></div></div><div
class="csc-textpic-clear"><!-- --></div>
<!-- Image block: [end] -->
<!-- CONTENT ELEMENT, uid:17/image [end] -->
<!-- CONTENT ELEMENT, uid:18/image [begin] -->
<a id="c18"></a>
<!-- Image block: [begin] -->
<div class="csc-textpic csc-textpic-center
csc-textpic-above"><div class="csc-textpic-imagewrap"
style="width:125px;"><dl class="csc-textpic-image csc-textpic-firstcol
csc-textpic-lastcol" style="width:125px;"><dt><img
src="uploads/pics/falnim.gif" width="125" height="61" border="0" alt=""
/></dt></dl></div></div><div class="csc-textpic-clear"><!-- --></div>
<!-- Image block: [end] -->
<!-- CONTENT ELEMENT, uid:18/image [end] -->
</div>
Terwijl ik eigenlijk wil:
<div 1234><img src="uploads/pics/falnim.gif" width="125" height="61"
border="0" alt="" /></div>
<div 1234><img src="uploads/pics/epdm.gif" width="102" height="61"
border="0" alt="" title="advertentie epdm" /></div>
Wat moet ik aanpassen? Ben bezig geweest met renderobj, maar dat genereerde
nochtans geen plaatje.
Willem
_______________________________________________
TYPO3-UG-dutch mailing list
TYPO3-UG-dutch at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-ug-dutch
More information about the TYPO3-UG-dutch
mailing list