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.

eZ debug

Timing: Jan 18 2025 05:03:34
Script start
Timing: Jan 18 2025 05:03:34
Module start 'layout'
Timing: Jan 18 2025 05:03:34
Module start 'content'
Timing: Jan 18 2025 05:03:34
Module end 'content'
Timing: Jan 18 2025 05:03:34
Script end

Main resources:

Total runtime0.0160 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 589.6719153.4609
Module start 'layout' 0.00640.0025 743.132839.3906
Module start 'content' 0.00890.0050 782.523493.8984
Module end 'content' 0.01390.0020 876.421934.3047
Script end 0.0160  910.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002515.6223140.0002
Check MTime0.00117.1909140.0001
Mysql Total
Database connection0.00063.940610.0006
Mysqli_queries0.002515.622330.0008
Looping result0.00000.113310.0000
Template Total0.001610.310.0016
Template load0.00095.416610.0009
Template processing0.00084.859010.0008
Override
Cache load0.00063.809410.0006
General
dbfile0.00127.386280.0001
String conversion0.00000.061140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs