How to generate numbered list in Scaffolding Plugin

Dmitry Budnik June 28, 2012

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

1 vote
CharlesH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2012
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
0 votes
Akeles
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2012

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

Dmitry Budnik July 2, 2012

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.

0 votes
CharlesH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 29, 2012
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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events