I think the list function had a way to generate a forloop. Try that.

[(list for=1-4 fmt=* join='')] hello

will give you "hello" indented 5 times.

/*
[[#testin]]
[(template first)]
[(template each)]`
[(list for=1-{+p0} fmt=* join='')][[{+p}|{+title}]]
[(template last)]
[[#end]]
*/

Notice the escaped newline: last I checked, bullet points will only
work as bullets if they are first on a line.
If you need to apply math to p0, use the math function. (Is that still
a plugin? I forget.)

On Sep 24, 12:09 pm, Kevin <[email protected]> wrote:
> Can't believe how much time I spent yesterday trying to do something really
> simple...
>
> Using
>
> [(search group=bwwiki.* template="toc")]
>
> Gives the data I want but not the output.  It gives a list pages that looks
> okay, but without bullets and if you look at the  output it uses a tone of
> &nbsp;&nbsp;&nbsp; ...  which is hard to style using CSS..
>
> So I look at it and it seems like it would be simple to do in the boltwire
> snippet code but I can't figure it out.
>
> So something like:
>
> [(search group=bwwiki.* template="testin")]
>
> /*
> [[#testin]]
> [(template first)]
> [(template each)]{+p0} [[{+p}|{+title}]]
> [(template last)]
> [[#end]]
> */
>
> Gives me a list like I want with the number of the level and a proper link
> to the page with title... Now all I need to do is convert the number into
> the number of * - 1 and I would have the output I could use...
>
> In pseudo php I could do something like:
>
> for($i = 0 , $i < {+p0}; $i++)
>     echo "*";
> echo " " . [[{+p}|{+title}]] . "<br>";
>
> and I would get output with
>
> * [[{+p}|{+title}]]
> ** [[{+p}|{+title}]]
> ** [[{+p}|{+title}]]
> * [[{+p}|{+title}]]
> ** [[{+p}|{+title}]]
> ** [[{+p}|{+title}]]
> ....
>
> The number of *'s depending on the level of the page - 1
>
> So I could create a function to do this, but isn't there a way to do this
> without that?
>
> Another option would be to create CSS tags for the levels and then style it
> with CSS...
>
> <div style='toc{+p0}'>&#149; [[{+p}|{+title}]]</div>
>
> Then create CSS for the .toc2 .toc3 to do the spacing without all the
> &nbsp;&nbsp; stuff.
>
> You can tell I am much better at PHP.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to