eZ Community » Forums » Setup & design » Image Dir Path
expandshrink

Image Dir Path

Image Dir Path

Friday 29 June 2012 3:46:48 am - 2 replies

Hello,

I'm trying to get the directory path of one of my images with the ezimagealiashandler but unfortunately I can't get it to work. I've tried lots of variotions of the attribute dirpath but no one returns the directory of the image.

Can anyone help me please?

thank you.

Friday 29 June 2012 9:10:45 am

Hi Ricardo

Dir path for attribute image is like:

 $node.data_map.attribute_image.content.image_alias.<span>dirpath</span>

More info you will find here: http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Objects/ezimagealiashandler

For images stored in design folder more details you'll find in eZURLOperator::eZImage static class, which is used to get the image path (for ezimage operator):

...
$bases = eZTemplateDesignResource::allDesignBases();
$triedFiles = array();
$fileInfo = eZTemplateDesignResource::fileMatch( $bases, 'images', $operatorValue, $triedFiles );
... 

Cheers

Saturday 30 June 2012 4:27:56 am

thank you for your reply, but the code that you provide for the dirpath didn't worked. Is there any other way to get the dir path for a image?

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from