[ic] [area] or [page] problems
Mike Heins
mike at perusion.com
Tue Apr 13 14:49:25 EDT 2004
Quoting Christopher Wenham (cwenham at synesmedia.com):
> On Tuesday 13 April 2004 13:11, Jeannie Stevenson wrote:
> > I'm having trouble, I have data in postgres SQL database, the products
> > table contains data which include a hyperlink to another page. I've tried
> > [page bonus]bonus programs[/page] and I've tried <A href="[area
> > bonus]">bonus programs</A> and other variations according to the docs but I
> > haven't been able to get this hyperlink to work out of a database.
>
> You either need to hard-code the URL in the data, or make Interchange
> interpolate it before displaying it. For security reasons, Interchange won't
> interpolate anything coming out of a database, even if you pass
> interpolate="1" to the [data] tag.
>
> I don't know if there's a general "interpolate this" tag in Interchange, but
> interpolation of IC tags is a side-effect of the uc_attr_list tag. So one way
> that might work:
>
> [perl tables="products"]
> my $ref = $Db{products};
>
> my $data = $ref->query("SELECT your_column FROM products WHERE
> your_criteria")->[0]->[0];
>
> return $Tag->uc_attr_list({}, $data);
> [/perl]
The way to do it, presuming you trust the data:
[data safe-data=1 table=foo col=bar key=baz]
or
[loop safe-data=1 list=os29000]
[loop-field comment]
[/loop]
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
Software axiom: Lack of speed kills.
More information about the interchange-users
mailing list