[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
RE: [ic] using a filter returning database field using data tag - no filter?
[ic4.6.4]
no reply yet, so can I suggest the following patch for tag_data:
Interpolate.pm insert the following at line 704:
elsif ($opt->{filter}) {
my $value=database_field($selector,$key,$field);
$value = filter_value($opt->{filter}, $value, $field);
return $value;
}
(just before:
#The most common , don't enter a block, no accoutrements
return database_field($selector,$key,$field);
)
this will allow the use of the filter argument when using the [data] tag to
return a database field.
Jonathan
Webmaint.
> [ic 4.6.4 / RH6.2]
>
> Hi All,
>
> I am trying to filter a returned database field using [data base= field=
> key= filter=]
>
> According to the docs
> (http://developer.akopia.com/cgi-bin/ic/docfly.html?id=7XCxbmSB&mv
> _arg=ictag
> s03%2e16):
>
> > and finally, the filter attribute is a set of Interchange
> filters that are
> applied to the data
> > 1) after it is read; or
> > 2)before it is placed in the table.
>
> Looking at Interpolate.pm, (lines 650+), it looks like a filter is only
> applied if:
>
> 1) using data session to set or return a session variable.
> 2) setting a database field using the value= argument.
>
> whereas just returning data appears to use:
>
> #The most common , don't enter a block, no accoutrements
> return database_field($selector,$key,$field);
>
> So... Do the docs refer to a later version, or is this just an oversight?
>
> Jonathan
> Webmaint.
>
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users