Flexible absolute files path [SOLVED]

Author Message

Lo' F.

Tuesday 26 October 2010 12:47:59 pm

Hi again,

I moved an extension package from an eZ installation to another but in here I am having a little problem retrieving the images saved (through ftp, not admin) inside an images folder of the extension folder.

Within the templates I addressed the image files giving a full path ( /extension/ezext/design/ezext/images/ ); however the new installation isn't made in the root folder, like the old one, but inside a subfolder of the root directory so all these image files cannot be found.

It would be a matter of adding this ez container folder to the beginning of each path but I really want to avoid this and make it more flexible instead.

What would you suggest? Thanks..!

loredanaebook.it

Heath

Tuesday 26 October 2010 1:53:24 pm

Hello Lo F,

You might want to checkout the ezimage and ezdesign operators which help avoid having to put full paths of images within templates by converting relative paths into the full path when the template is compiled.

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Template-operators/URLs/ezimage

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Template-operators/URLs/ezdesign

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Lo' F.

Tuesday 26 October 2010 2:18:27 pm

Thank you, Heath! Really helpful!

loredanaebook.it

Heath

Tuesday 26 October 2010 2:46:31 pm

Your welcome Lo F!

(Thank you for marking this thread as solved)

Best Wishes,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

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 10:26:17
Script start
Timing: Jan 18 2025 10:26:17
Module start 'layout'
Timing: Jan 18 2025 10:26:17
Module start 'content'
Timing: Jan 18 2025 10:26:18
Module end 'content'
Timing: Jan 18 2025 10:26:18
Script end

Main resources:

Total runtime1.0307 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.1484152.6406
Module start 'layout' 0.00520.0034 741.789139.4688
Module start 'content' 0.00851.0208 781.2578551.8594
Module end 'content' 1.02930.0014 1,333.117212.1563
Script end 1.0307  1,345.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3277160.0002
Check MTime0.00140.1347160.0001
Mysql Total
Database connection0.00080.076410.0008
Mysqli_queries0.966093.7227600.0161
Looping result0.00120.1123580.0000
Template Total0.996396.720.4981
Template load0.00210.200320.0010
Template processing0.994296.454920.4971
Template load and register function0.00010.010710.0001
states
state_id_array0.00080.076910.0008
state_identifier_array0.00150.149120.0008
Override
Cache load0.00180.1712260.0001
Sytem overhead
Fetch class attribute can translate value0.00060.056620.0003
Fetch class attribute name0.00150.148560.0003
XML
Image XML parsing0.00100.095920.0005
class_abstraction
Instantiating content class attribute0.00000.002180.0000
General
dbfile0.00200.1914230.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs