[ic] Restrict Tag
kevin at cursor.biz
Mon Feb 21 09:13:00 EST 2005
Peter [peter at pajamian.dhs.org] wrote:
> 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.
The [PREFIX-*] looping subtags are not tags in the usual Interchange
meaning of the word; They can be considered as "placeholders" and
are parsed by the looping tag itself, as part of its body. For
instance, the [loop-code] subtag would be replaced with an appropriate
value, rather than a specific call to a loop_code tag being made. The
same is true for [loop-field] etc.
Another example is [if-PREFIX-*] which would be parsed, as part of the
looping tag's body, up to the matching [/if-PREFIX-*] closing subtag.
The body of the "if/else" would be either removed or left in place, as
appropriate. Any remaining ordinary Interchange tags would be
interpolated after the looping tag has completed its initial scan/replace
Basically, the looping tag includes a pre-processor which works on a
defined set of subtags.
This is just a general explanation of how it works - to give you an
idea of why "looping subtags" work slightly differently to the ordinary
tags, and are parsed separately from the rest of the page source.
I'm sure someone will correct me if any of the above is inaccurate. :-)
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin at cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
More information about the interchange-users