[TYPO3-english] Limit rendering content elements in a menu
Tapio Markula
tapio.markula at xetpoint.fi
Mon Oct 20 17:30:07 CEST 2008
Hi
I trye to use limit here
temp.pikku-uutiset = HMENU
temp.pikku-uutiset {
special = directory
special.value ={$pikku-uutiset}
maxItems = 5
wrap = <table class="table_ajankohtaista" cellpadding="0"
cellspacing="0" border="0">|</table>
1 = TMENU
#1.alternativeSortingField=endtime
1.NO.doNotLinkIt = 1
1.NO.stdWrap.cObject = COA
1.NO.stdWrap.cObject {
5 = TEXT
5.value = <tr><td valign="top">
6 = CONTENT
6 {
table = tt_content
select {
where = colPos=0
pidInList.field = uid
limit=1
}
renderObj = IMAGE
renderObj {
file.import=uploads/pics/
file.import.field=image
file.width = 94c
#file.height = 94c
stdWrap.dataWrap = <table align="left" cellspacing="0"
cellpadding="0" border="0"><tr><td valign="top"><div style="border: 1px
solid rgb(0, 0, 0); margin: 10px 10px 10px 6px; padding: 2px; width:
94px; height: 94px;">|</div></td></tr></table>
}
}
10 = TEXT
10 {
stdWrap.dataWrap (
<h2
style="margin-top:10px;">{field:title}</h2>
<p>{field:abstract}</p>
)
}
30 = TEXT
30 {
stdWrap.dataWrap (
<p class="readMore"><a
href="index.php?id={field:uid}"><b>Lue lisää <img
src="fileadmin/template/kuvat/nuoli.gif" alt="" height="7"
width="9"></b></a>
)
}
40 = TEXT
40.value = </td></tr>
}
}
I tried limit=1 in avoid extra image render object - if first have image
and second not I get an empty box.
Maybe some if statement could help too.
More information about the TYPO3-english
mailing list