How to create list on a dsp?
Author: martinandheather@gmail.com (byjones)
If I had a table with a number of string values in, how would I output this on a DSP as an unordered list (with UL and LI tags)?
e.g.
table SOMEVALUES
FIELD TYPE
======================
ID int 5 Pkey
VALUE String
with the values
1 Item1
2 Item2
3 Item3
4 Item4
I would like to have, in the generated source
< ul class="myclass">
< li>Item1< /li>
< li>Item1< /li>
< li>Item1< /li>
< li>Item1< /li>
< /ul>
I would then style this with my own CSS
Thanks in advance
Martin
3 Comments
Local Administrator
Hi Martin,
Try using something like this in the layout source:
<ul id="uent:SOMEVALUES.DUMMY">
<li id="uocc:SOMEVALUES.DUMMY">
<span id="ufld:VALUE.SOMEVALUES.DUMMY">Static Text</span>
</li>
</ul>
That should produce an output like:
Hope that helps.
James
Author: James Rodger (james.r.rodger@gmail.com)
Local Administrator
Hi James,
Thanks for the reply. I will give this a go.
I had tried with painting a dummy field, and then giving it the RawHTML attribute, and then doing DUMMYFIELD.DUMMY = "< ul>< li>Item1< /li>< li>Item2< /li>< /ul>" which seemed to work, but your method will be better.
Martin
Author: byjones (martinandheather@gmail.com)
Local Administrator
... or use a dummy entity and getlistitems to populate the records.
Success, Uli
Author: ulrich-merkel (ulrichmerkel@web.de)