Ole Morten Halvorsen
|
Wednesday 08 August 2007 3:25:25 pm
Hi Emil, Did you try to add the wildcard character (*)? attribute_filter, array(array( 'image/tags' , 'like', '*string*')),
Doc reference: http://ez.no/doc/ez_publish/technical_manual/3_9/reference/modules/content/fetch_functions/list Ole M.
Senior Software Engineer - Vision with Technology
http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh
eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578
|
Bruce Morrison
|
Wednesday 08 August 2007 4:48:32 pm
Hi Emil When you add the attribute_filter line try removing the class_filter_type & class_filter_array lines so you end up with someting like children_tag=fetch( 'content', 'list',
hash( 'parent_node_id', 12,
depth,4,
attribute_filter, array(array( 'image/tags' , 'like', '*string*')),
limit, $page_limit,
offset, $view_parameters.offset ) )
I seem to recall that this has worked for me in the past. Also turn on debugging so you can see the SQL output. This allows you to check the generated SQL and you can tweak the fetch to get the desired result.
Cheers Bruce
My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
|
Bruce Morrison
|
Thursday 09 August 2007 1:02:16 am
Hi Emil Any errors in the debug? Try changing children_tag=fetch( 'content', 'list',
to children_tag=fetch( 'content', 'tree',
"list" will only return nodes directly under (children) the parent node (12) and depending on the depth of node 12 this may cause issues with depth,4 I'm also assuming they you have a {def $children_tag=...
in there.
Cheers Bruce
My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
|
Heath
|
Monday 13 August 2007 2:57:01 am
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
Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org
|
Emil Österlund
|
Monday 13 August 2007 3:44:46 am
{def $c=fetch( 'content', 'tree', hash( 'parent_node_id', 3,
depth, 17,
attribute_filter, array( array( 'image/tags', 'like', '*larsemil*' ) )
) )}
{$c|attribute(show,1)}
{$c.0|attribute(show,1)}
i put this in my code as this 'should' work then.
3 is the lowest node containing all users and everyting.
depth 17 should cover all images by far. and i looked up and it should be image/tags.
i ony get this output:
Attribute Type Value Attribute Type Value is it me or is it my ez publish?
|
Heath
|
Monday 13 August 2007 5:29:12 am
Emil, I think your continued breakdowns in search of a resolution and working solution derive from a number of combined factors. 1) Your using an unsupported branch which is very old, (Re: eZ publish <i>3.7.8</i>) 2) Your using a dirty installation, I can't see it but I'm certain you are. By dirty I mean it's in an unknown state (the database could be corrupt for all you know for certain), it's using an old version of eZ (lots of bug fixes you may need are not available), it's an old installation with lots of customizations also in an unknown state. The solution / site as a whole could not be certified without much cleanup and re-organizing in a stable clean install of eZ Publish (Which you should do ... now instead of later) 3) Your new to eZ Publish. This is not so bad except you need professional help to lead you to stability and experience, I hope your employer supports you in seeking this experience and support.
Cheers, Heath
Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org
|