Forum
Nested Unordered Lists
Hi,
I'd like to know if there is a simple way to create a .html template for nested unordered lists.
The code I am trying to use is as follows:
<ul>
<perch:repeater id="electives" label="Electives">
<li>
<perch:content id="elective" type="text" label="Elective Units" required="false" title="true" />
<ul>
<perch:repeater id="elect">
<li><perch:content id="elected" type="text" Label="Elective Groups" required="false" title="true" /></li>
</perch:repeater>
</ul>
</li>
</perch:repeater>
</ul>
but it does not nest the elements in Perch CMS, how come?
Hi Garth - you can't nest repeaters, that's simply not supported.
Hi,
So is there a workaround?
Hi Garth,
Is this your whole template, or is it part of a larger one?
If this is your whole template, you could make it a 'repeating region' and use a template such as this:
That seems to have worked, thank you very much.
The only problem is, it cannot be used with other elements unless multiple is set to true and it reproduces other content such as when used with an accordion
It's a pity there are no "off the shelf" solutions for this kind of thing and that it takes a real skill to be able to do what is relatively simple in HTML.