Forums / Setup & design / Show related objects - pictures, pdf and so on

Show related objects - pictures, pdf and so on

Author Message

Valentin Svelland

Wednesday 16 July 2003 12:31:42 am

I find the standard way to upload picture very easy to grasp for beginners introduced to the eZ 3.x-solution. But when more than this one picture is needed it's not as easy, at least not yet.

I've made a separate folder for pictures at root-level and subfoldes for different categories of images in this. E.g. Politics, nature, people and so on. I add them as related objects in the article and copy/paste the <object> tag into the body-field of the article. Still, the picture is only shown as a link in the full-view of the article. I want it to shown directly and with some way to decide alignment from the admin-gui.

I guess I've forgotten to override some template, but if you got the solution I got one more: I also want to show related pdf- and word-files as links with pdf-/word-icons as well as filesize in Kb written in the end. Could you also give me a hint about how to accomplish this?

Example:
[PDF-icon] ClickableFilename.pdf (125 Kb)

Bjørn Kaarstein

Wednesday 16 July 2003 1:38:39 am

You need to place embed_class_5.tpl in yourdesign\override\templates\content\view in order to show the pictures directly.

As for your second question, I believe you will have to write embed overrides for your file class aswell.

Regards Bjørn

Valentin Svelland

Wednesday 16 July 2003 1:45:49 am

Thanks Bjørn, I've already copied embed_class_5.tpl from the demo site into the folder you refer to, but I just can't get it to override /design/standard/templates/content/view/embed.tpl. It works if I overwrite this file with my embed_class_5.tpl-code directly, but that's hardly a good solution.

I've turned of all caching and on debugging to see which template files are loaded, so I know this for sure. Why won't my embed_class_5.tpl overwrite the standard embed.tpl?? I'm going mad.. :)

Bjørn Kaarstein

Wednesday 16 July 2003 2:26:47 am

Which version of ez are you using? embed_class_5.tpl should work fine in 3.0, but in 3.1 I think there's a new override system. I haven't upgraded yet, so I'm not really sure how to use this system.

Take a look here, if you're using 3.1.

http://ez.no/developer/ez_publish_3/documentation/customization/custom_design/override_templates

Let me know if you use 3.0, and I'll try to figure out what is wrong. No promises of a solution though, but I'll try :)

Regards Bjørn

Valentin Svelland

Wednesday 16 July 2003 2:54:16 am

Thanks Bjørn! You're last posting really gave me some useful hints. Yes, I use v.3.1 (and will upgrade to v.3.2 the 17th of September :)) and the link you posted had the solution:

I wasn't aware of the new override system so I just couldn't figure this out until I read this. I checked out the override.ini.append at the /settings/siteaccess/admin and quickly realized I were missing this lines in my own override.ini.append:

[embed_image]
Source=content/view/embed.tpl
MatchFile=embed_image.tpl
Subdir=templates
Match[class]=5

[text_linked_image]
Source=content/view/text_linked.tpl
MatchFile=text_linked_image.tpl
Subdir=templates
Match[class]=5

Thanks again Bjørn, the likes of you really make this forum a damn good resource.

eZ debug

Timing: Jan 18 2025 11:16:51
Script start
Timing: Jan 18 2025 11:16:51
Module start 'content'
Timing: Jan 18 2025 11:16:51
Module end 'content'
Timing: Jan 18 2025 11:16:51
Script end

Main resources:

Total runtime0.1902 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.0083 588.9609180.8125
Module start 'content' 0.00830.0078 769.773497.9297
Module end 'content' 0.01610.1741 867.7031526.8750
Script end 0.1901  1,394.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00442.3062200.0002
Check MTime0.00190.9842200.0001
Mysql Total
Database connection0.00160.858910.0016
Mysqli_queries0.136971.97491410.0010
Looping result0.00140.75251390.0000
Template Total0.173591.210.1735
Template load0.00110.565610.0011
Template processing0.172590.667110.1725
Override
Cache load0.00080.425910.0008
Sytem overhead
Fetch class attribute can translate value0.00080.437310.0008
XML
Image XML parsing0.00030.163610.0003
General
dbfile0.00341.7980200.0002
String conversion0.00000.003930.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.0002 secs