Only link to image shown

Author Message

Roger Schmidt

Saturday 12 August 2006 4:52:08 pm

Hi all

When using following code in template only link to image is shown instead of image itself:

{attribute_view_gui attribute=$node.object.data_map.image image_class="small"}

Following template is automatically taken for the image when using code above:
design/standard/templates/content/view/text_linked.tpl

Any hints?

eZ Publish version 3.8.3, Apache 1.3, PHP 4.4.3RC3-dev, WinXP Pro.

Thanks,
Roger

Xavier Dutoit

Sunday 13 August 2006 3:25:26 am

Hi,

It uses the default template instead of the one for images. That's defined in the override.ini.append.php of your siteaccess

X+

http://www.sydesy.com

Roger Schmidt

Sunday 13 August 2006 4:37:17 am

Thanks Xavier.

Which is the most suitable template for image display I could use? There are hundreds of templates around and when looking on their code I get a little bit confused (at least for the moment).

If possible this template should take image_class into account (image_class="small") - as parameter in example?

Regards,
Roger

Roger Schmidt

Sunday 13 August 2006 5:04:19 am

As a test I have just copied the template found in base/override/templates/embed/image.tpl into mysite/override/templates and renamed it to line_view_gallery_article_image.tpl.

And there is a new entry in override.ini.append.php:

[line_view_gallery_article_image]
Source=content/view/text_linked.tpl
MatchFile=line_view_gallery_article_image.tpl
Subdir=templates
Match[class_identifier]=article
Match[section]=6

There are already other entries in this ini file for same class_identifier and section, and they work as supposed.

Inline template debugging tells me that still design/standard/templates/content/view/text_linked.tpl is used for image display! All caches were cleared.

In the debug notices below the actual website design/plain_site/override/templates/line_view_gallery_article_image.tpl is listed (but not as used template).

Regards,
Roger

Roger Schmidt

Sunday 13 August 2006 5:20:01 am

Nothing...

My earlier post suddenly disappeared, so I posted same entry again, but now I cannot delete this entry here, only change the content!

Roger Schmidt

Tuesday 15 August 2006 1:05:41 pm

Is there anybody around who can help with this issue?

Thanks,
Roger

Softriva .com

Tuesday 15 August 2006 1:28:17 pm

I had the same issue before. Check out this post.
http://ez.no/community/forum/general/attribute_view_gui

Roger Schmidt

Tuesday 15 August 2006 1:56:55 pm

Thanks Oozy, but this did unfortunately not solve the problem. Still showing only link.

Did you have to edit anything in override.ini.append.php as Xavier mentioned in his post for using another default template for images?

When clicking on the link, the default object view is shown. The corresponding image can be seen there. Meaning, in general showing images should work in my eZ publish environment.

There are no error messages in debug output (only translation warnings and notices).

Best regards,
Roger

Roger Schmidt

Tuesday 15 August 2006 3:24:12 pm

Finally, I got the solution. :-)

It is a good idea to look at the settings of admin interface. I have found an entry for embeded images in its override.ini.append.php:

[embed_image]
Source=content/view/embed.tpl
MatchFile=embed_image.tpl
Subdir=templates
Match[class_identifier]=image

I added same entry in corresponding override.ini.append.php for my site, and adapted following for overwriting default template for images of my site (text_linked.tpl):

[embed_image]
Source=content/view/text_linked.tpl
MatchFile=embed_image.tpl
Subdir=templates
Match[class_identifier]=image

Template embed_image.tpl was copied from design/admin/override/templates to template directory of my site.

Regards,
Roger

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

Main resources:

Total runtime0.8384 sec
Peak memory usage4,096.0000 KB
Database Queries77

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.9141152.6250
Module start 'layout' 0.00590.0038 740.539139.4453
Module start 'content' 0.00960.8274 779.9844642.0703
Module end 'content' 0.83700.0013 1,422.054716.1641
Script end 0.8384  1,438.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3660160.0002
Check MTime0.00120.1478160.0001
Mysql Total
Database connection0.00080.091110.0008
Mysqli_queries0.768691.6770770.0100
Looping result0.00070.0869750.0000
Template Total0.803395.820.4017
Template load0.00190.228020.0010
Template processing0.801495.585620.4007
Template load and register function0.00020.028110.0002
states
state_id_array0.00100.115310.0010
state_identifier_array0.00080.095320.0004
Override
Cache load0.00180.2121580.0000
Sytem overhead
Fetch class attribute can translate value0.00100.116530.0003
Fetch class attribute name0.00160.1863100.0002
XML
Image XML parsing0.00060.076730.0002
class_abstraction
Instantiating content class attribute0.00000.0026100.0000
General
dbfile0.00070.0824160.0000
String conversion0.00000.001340.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
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
19content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 43
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs