[ic] Restrict Tag

Peter peter at pajamian.dhs.org
Mon Feb 21 06:17:30 EST 2005

On 02/21/05 02:18, Stefan Hornburg wrote:
> On Sun, 20 Feb 2005 21:41:49 -0800
> Peter <peter at pajamian.dhs.org> wrote:
>>[restrict enable="field area page"][field name=comment 
>>code="[item-code]" interpolate=1][/restrict]
>>Question 2:  Is there any way to restrict down to only the page and area 
>>tags or do I simply have to live with including the field tag so that 
>>the comment can be displayed?
> [loop search="sf=products/st=db/co=1/sf=sku/se=[item-code]/op=eq/rf=code,comment"]
> [restrict enable="field area page"][loop-param comment][/restrict]
> [/loop]
> Untested, but hopefully you get the idea.

Yes, basically you're saying that since looping tags are parsed ahead of 
time I can use them in spite of them being restricted (or not explicitly 

Please correct me if I'm worong here, but I don't think this will work 
for the following reason...

The main problem is that the looping tags can't be reparsed (with 
iterpolate=1) so there's no way to get them to parse the area and page 
tags inside the comment.  I could have just as easily done this (and I 
tried it) but it has the same problem:

[restrict enable="area page"][item-field comment][/restrict]

hence the reason I have to use the field tag instead of the PREFIX-field 
tag, or any looping tag for that matter.

I can live with having to enable the field tag if I have to but it's a 
loose end I'd like to clean up if I can.

It also seems to me to be a rather serious flaw of the restrict tag in 
that the primary usage of the tag would seem to me to allow for the 
restricted parsing of tags in included text where you don't know what 
might be inside it, hence it seems like the real legitimate usage of the 
tag would require inclusion of some external source without having to 
compromise the inclusion tag itself.  And of course, reparsing of the 
inclusion tag output is also necessary for this which eliminates a lot 
of possible inclusion mechanisms.


More information about the interchange-users mailing list