Forums / Setup & design / Only link to image shown

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

eZ debug

Timing: Jan 18 2025 18:40:59
Script start
Timing: Jan 18 2025 18:40:59
Module start 'content'
Timing: Jan 18 2025 18:40:59
Module end 'content'
Timing: Jan 18 2025 18:40:59
Script end

Main resources:

Total runtime0.1661 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.8281180.8359
Module start 'content' 0.00520.0058 769.6641101.9922
Module end 'content' 0.01100.1550 871.6563530.5234
Script end 0.1660  1,402.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00372.2190200.0002
Check MTime0.00140.8173200.0001
Mysql Total
Database connection0.00050.319110.0005
Mysqli_queries0.120272.35201410.0009
Looping result0.00140.87281390.0000
Template Total0.154793.110.1547
Template load0.00090.517810.0009
Template processing0.153892.602210.1538
Override
Cache load0.00060.351010.0006
Sytem overhead
Fetch class attribute can translate value0.00050.284810.0005
XML
Image XML parsing0.00030.163810.0003
General
dbfile0.00392.3678200.0002
String conversion0.00000.003030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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