[ic] wishlist: [list prefix="inside"]

Paul Jordan paul at gishnetwork.com
Thu Jul 8 15:48:33 EDT 2004


Grant [emailgrant123b at yahoo.com] wrote:
> --- Stefan Hornburg <racke at linuxia.de> wrote:
>> On Wed, 7 Jul 2004 10:46:16 -0700 (PDT)
>> Grant <emailgrant123b at yahoo.com> wrote:
>>
>>> from Grant
>>
>> Can you elaborate a little bit on this !?
>>
>> 	Racke
>
> Sorry about that.  Check this out:
>
> [loop]
>    [loop prefix="inside"]
> <ul>
>    [list prefix="inside"]
>    <li></li>
>    [/list]
> </ul>
>    [/loop]
> [/loop]
>
> That way the <ul></ul> won't be written unless the
> inside loop loops, and the <li></li> is written as
> many times as the loop loops.
>
> - Grant


This functionality (with correct syntax) already exists Grant. A good example
is on the query page, and applies to loop lists...

http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=ictags04%2e55

I had posted a nice example to the wiki, but believe it has been disposed of.
it never did really work right IMO.

Anyways, just use the "prefix" and "list_prefix" parameters, and they will be
honored for the "on-match" etc stuff

[loop .....]

     [loop .....
		prefix=inside
		list_prefix=cow ]

		[cow_on_match]
  			<ul>
		[/cow_on_match]

     		[cow]
     			<li></li>
     		[/cow]

		[cow_on_match]
 		 	</ul>
		[/cow_on_match]

     [/loop]

[/loop]

HTH
Paul





More information about the interchange-users mailing list