Author Topic

Heath

Heath

Monday 13 August 2007 2:57:01 am

Comment48450

Emil,

I took a moment to <i>really</i> test for myself how to do this this morning and found this worked great for me :)

{def $c=fetch( 'content', 'tree', hash( 'parent_node_id', 175,
                depth, 7,
                attribute_filter, array( array( 'article/keywords', 'like', '*string*' ) )
                ) )}

{$c|attribute(show,1)}
{$c.0|attribute(show,1)}

Also works by id just fine ...

{def $c=fetch( 'content', 'tree', hash( 'parent_node_id', 175,
                depth, 7,
                attribute_filter, array( array( 865, 'like', '*string*' ) )
                ) )}

Also works with a variable works as well like this ...

{def $tag='string'}
{def $c=fetch( 'content', 'tree', hash( 'parent_node_id', 175,
                depth, 7,
                attribute_filter, array( array( 'article/keywords', 'like', concat( '*', $tag, '*' ) ) )
                ) )}

Remember to clear all cache before testing, also consider the following, <i>http://ezpedia.org/wiki/en/ez/solution_template_development_without_clearing_cache</i>

For future users we have published the following documentation on eZpedia for long term storage and searching! eZpedia is your friend :)
<i>http://ezpedia.org/wiki/en/ez/solution_how_to_do_an_attribute_filter_using_the_like_condition</i>

Cheers,
Heath

7x | https://se7enx.com/
Brookins Consulting | https://brookinsconsulting.com/
Certified | http://web.archive.org/web/201012...th.ez.no/certification/verify/380350
Solutions | https://projects.exponential.earth/users/community/brookins-consulting
eZpedia community documentation project | http://ezpedia.se7enx.com