Fetch images from Media Library

Author Message

Sandeep Kadam

Friday 11 June 2010 5:14:43 am

Hello All,

Can any one tell me how to fetch images on pagelayout.tpl which are added in Media Library ?

Thanks,
Sandeep Kadam

André R.

Friday 11 June 2010 6:29:43 am

Take a look at the content fetch functions:

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_fetch_functions

The one you want to look at is "list" ( or "tree" ), and in this case "parent_node_id" would normally be 43 (the node id of the "Media" folder), but you might want to specify the Image folder which normally is 51. To see what node id something has, either hover over items in content structure menu (left menu in admin) or click on details button/tab when you view the element you would want to fetch content from.

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

Sandeep Kadam

Sunday 13 June 2010 10:04:14 pm

Hello André R,

Thanks for your reply,
I tried as mentioned in ez_doc.
but it won't affect, I am Unable to fetch that images in my pagelayout.
Can you give me full explanation regarding this ?

Thanks,
Sandeep Kadam

Sandeep Kadam

Wednesday 16 June 2010 11:12:09 pm

Hi All,
Sorry for wrong information. this is what i actually need to do....
I Have a class named "Guest room" in which i have used attribute name "Masthead Images" of type "Object relations" as a container for rotation images on my web pages...
I have uploaded images in Media Library/Images folder.
and added that images as an "add objects" for "Masthead Images" attribute in "Guest room" class object.
What i need is to fetch url of that images so that i can use it in script for rotation..
Please let me know if i need to explain more about my requirement .......
Thank you ,
Sandeep

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.