Forums / Developer / Ezdesign and ezimage operators in php ?

Ezdesign and ezimage operators in php ?

Author Message

H-Works Agency

Monday 27 October 2008 2:44:21 am

Is there a php function corresponding to "ezimage" and "ezdesign" (find an image in siteaccesses design list), "ezurl", "ezroot" template operators ?

I tried to investigate source code but couldn't find anything.

This would allow us to reference images, or tpl inside php script without the need to put full path which could be very long.

Thanx in advance,
Martin

EZP is Great

H-Works Agency

Thursday 01 July 2010 3:28:07 am

For information i think this is it :

$tpl = templateInit();

$strPath = ezUrlOperator::eZImage($tpl, 'icons/mypicture.jpg', '');

$results['img'] = 'http://' . eZSys::hostname() . $strPath;

With : 'icons/mypicture.jpg' in your design's images directory.

OR

eZURLOperator::eZDesign() if you want to search a tpl path

EZP is Great