[ic] Custom tag trouble
Kevin Walsh
kevin at cursor.biz
Tue Mar 21 10:22:28 EST 2006
"Elver Loho" <elver.loho at gmail.com> wrote:
> The problem we're having is that with the lc2 tag, the [page ...]
> stuff gets parsed to:
>
> "/.../ If you are a new client please click <a
> href="http://www.kriso.ee/cgi-bin/shop/new_account.html?id=IjMx5JnV&mv_pc=14102">new
> account[/page] link."
>
> Basically it seems that it doesn't see the [/page] part for some
> reason. Any ideas?
>
I haven't read all of your article - nor have I examined your code,
so I apologise in advance if I'm missing something.
The simple solution to your problem is to use the [area] tag instead
of [page]. So, instead of this:
[page new_account]new account[/page]
use this:
<a href="[area new_account]">new account</a>
"[/page]" is just a token that gets replaced with "</a>", outside of the
usual interpolation mechanism, so another solution would be to emulate
this behaviour in your tag. The code in Vend::Interpolate::vars_and_comments
is as follows:
# Translate legacy atomic [/page] and [/order] tags
$$html =~ s,\[/page(?:target)?\],</a>,ig;
$$html =~ s,\[/order\],</a>,ig;
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin at cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
More information about the interchange-users
mailing list