How to generate numbered list in Scaffolding Plugin

Hello,

I'm trying to create a template where my users will be able to pick several lines using checkboxes. I'm using Scaffolding Plugin to do it.

I need this:

{list-data:Mydailylist|type=check|multiple=true}

{list-option:value=1}# Wake up;{list-option}

{list-option:value=2}# Watch TV;{list-option}

{list-option:value=2}# Clean my teeth;{list-option}

{list-data}

To be converted to:

<ol>

<li>Wake up;<li>

<li>Watch TV;<li>

<li>Clean my teeth;<li>

</ol>

What I'm getting is:

<ul style="list-style: none; margin: 0px; padding: 3px"><li><label><input type="checkbox" name="scaffold.Mydailylist" value="&lt;WikiReference&gt;

&lt;nonWiki&gt;# Wake up;&lt;/nonWiki&gt;

&lt;wiki&gt;# Wake up;&lt;/wiki&gt;

&lt;/WikiReference&gt;" tabindex="5"><ol>

<li>Wake up;</li>

</ol>

</label></li>

<li><label><input type="checkbox" name="scaffold.Mydailylist" value="&lt;WikiReference&gt;

&lt;nonWiki&gt;# Watch TV;&lt;/nonWiki&gt;

&lt;wiki&gt;# Watch TV;&lt;/wiki&gt;

&lt;/WikiReference&gt;" tabindex="5"><ol>

<li>Watch TV;</li>

</ol>

</label></li>

<li><label><input type="checkbox" name="scaffold.Mydailylist" value="&lt;WikiReference&gt;

&lt;nonWiki&gt;# Clean my teeth;&lt;/nonWiki&gt;

&lt;wiki&gt;# Clean my teeth;&lt;/wiki&gt;

&lt;/WikiReference&gt;" tabindex="5"><ol>

<li>Clean my teeth;</li>

</ol>

</label></li>

</ul>

Is there any way to make Scaffolding Plugin show numbered list instead of <ul>?

3 answers

Alternatively it seems that the CSS list-style-type property could be used to good effect. The value "decimal" could be applied even though the list is an unordered list. See this question on stack overflow, where the question includes an example of how to code this - http://stackoverflow.com/questions/8251597/list-style-type-decimal-after-the-actual-content-of-the-li
You could try using jquery (JavaScript library available in Confluence) to replace the ul tags with ol instead. This should affect how the browser renders the HTML, but with any luck, have no adverse effects on the scaffolding processing.

How about putting

{list-data:Mydailylist|type=check|multiple=true}
{list-option:value=1}1 Wake up;{list-option}
{list-option:value=2}2 Watch TV;{list-option}
{list-option:value=3}3 Clean my teeth;{list-option}
{list-data}

You may want to post your question at the CustomWare's Scaffolding plugin page or search at http://community.customware.net/customware

Thank everyone for your answers!

CSS list-style-type property seemed to be the best solution as long as I'm not too good in JS.

This is what what Scaffolding currentle gives me.

&lt;ul style="list-style: none; margin: 0px; padding: 3px 0px"&gt;
&lt;li&gt;
	&lt;ul&gt;
		&lt;li&gt; Wake up;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
	&lt;ul&gt;
		&lt;li&gt; Watch TV; &lt;/li&gt;
	&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

I do not know how to apply css property to this list only. I wanted to use <div id="decimal-list"> with {html} macro:

{html}

<div id="decimal-list">

{html}

Scaffolding call goes here.

{html}

but confluence adds "<p></p>" between my html and Scaffolding call.

The only solution is JS, but this is our of my time budget.

2 huasoon [Akeles] : I need the list to be numbered and look like this 1,2,3, etc.

1,3,5 will not look good for me.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 3 hours ago in Canada

TOPIC TUESDAY - Fav Scary Monster!

Hey folks and happy Topic Tuesday! In the spirit of Halloween and all things scary, today's topic is what is your favourite horror movie monster. My personal choice here would be Jason from the Frida...

7 views 0 0
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you