Share » Forums » Developer » image alias deleted after clearing cache

image alias deleted after clearing cache

image alias deleted after clearing cache

Monday 08 September 2008 12:51:10 am - 2 replies

Author Message

Xavier Serna

Monday 08 September 2008 1:05:55 am

We have suffered similar problems here with image alias, and were solved upgrading to the official 4.0.1.

hth!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

Marcus M.

Monday 08 September 2008 1:47:18 am

I'm not sure about the correct way to deal with image aliases in custom modules / extension.

I've read this article http://ez.no/doc/ez_publish/technical_manual/4_0/reference/scripts/generic/ezcache_php and there is a image alias cache. Therefore I guess its correct that after clearing cache no aliases are available. But how to access the desired one?

The class eZImageAliasHandler has methods to check if a image alias exists and to get the full path to the desired image.

        $dataMap = $object->dataMap();

        $aliasHandler = new eZImageAliasHandler( $dataMap['image'] );
        $imgAlias = $aliasHandler->attribute( 'consultant_flash' );
        
        ezDebug::writeDebug($imgAlias['full_path']);

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

36 542 Users on board!

Forums menu