Tuesday 05 May 2009 1:28:56 am
Just in case someone has also problems to use this code: Make sure you add the ContentClass which has the image attribute you want use to the AvailableImageDataTypes[] under block [ImageDataTypeSettings] settings in site.ini:
[ImageDataTypeSettings]
AvailableImageDataTypes[]=yourCustomClassWithImageAttribute
Then the requested ImageAlias will be created on the first request. Try this in your module:
$ezAjaxOptions = array(
'dataMap' => array('all'),
'fetchPath' => false,
'fetchChildrenCount' => false,
'dataMapType' => array(),
'loadImages' => true,
'imagePreGenerateSizes' => array('yourCustomImageAlias')
);
$node = eZContentObjectTreeNode::fetch( $testNodeId );
$node_reduced = eZAjaxContent::simplify( $node, $ezAjaxOptions );
Best regards,
Patrick
|