Forums / Developer / fetch in a xmlBlock attribute

fetch in a xmlBlock attribute

Author Message

Peggy Gadiou

Thursday 14 August 2008 2:23:36 am

Hello

I want know how fetch a xmlblock attribute??

I have my class like this :

myClass
classement : xmlblock
name : textLine
Labels : xmlblock
city : textLine

And my fetch is :

{def $name = '*'}
{def $com= '*'}
{def $lab= '*'}

{set $children=fetch('content','list',hash(
	'parent_node_id',$node.node_id,
	'sort_by', array( 'attribute',true(),'myClass/city' ),
	'limit',$page_limit,
	'offset',$view_parameters.offset,
	'attribute_filter',array(
		array(myClass/name,'like',$name),
		array(myClass/city','like', $com),
		array(myClass/Labels,'like', $lab))
))

When I tryed only with name or city it's work,
When I tryed with name and city it's work,
but when I tryed with label attribute... I cry

help me please...

Thank

André R.

Thursday 14 August 2008 5:27:32 am

You can see on the doc witch datatypes that support sorting and attribute filter:
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/fetch_functions/list

xmlblock is unfortunately not one of them, and it would probably produce very slow fetching if it did support it and you used it.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom