Forums / General / Embed Image Template override

Embed Image Template override

Author Message

John Smith

Friday 11 April 2008 4:13:13 am

Hi there,

Hope someone can help me.

In ez4.0 i am trying to override a template named as "image_embed_node", the location of this template is:

Adminstration -> Design -> Templates -> /node/view/embed.tpl

Has anybody got clue how to do it.

I have created another template under /node/view/embed.tpl with the same class identifier and changed the priority to 1. But i am still getting the code from the "image_embed_node"....

In the override file I got the following:

[sl_embed_image]
Source=node/view/embed.tpl
MatchFile=sl_embed_image.tpl
Subdir=templates
Match[class_identifier]=image

[image_embed_node]
Source=node/view/embed.tpl
MatchFile=embed/image.tpl
Subdir=templates
Match[class_identifier]=image

John Smith

Friday 11 April 2008 7:41:32 am

Anybody please????

Jon Staines

Friday 11 April 2008 9:20:19 am

Does debug show that it is still using embed/image.tpl if you list the templates used?

Which extension if any did you save sl_embed_image.tpl under? I assume this is for the admin site as I've never seen /node/view/embed.tpl outside of that.

John Smith

Saturday 12 April 2008 5:48:42 am

Hi Jon,

Thanks for your kind reply. I have checked the list of templates but it not displaying the template which I have created.

In the list I am getting.

Usage Count 1
Requested template: content/view/embed.tpl
Template: embed/image.tpl
Template loaded: design/base/override/templates/embed/image.tpl

You will get this sort of result if you create the article and add an image with Add Object" button.

Displaying the article from the public site will give all the results mentioned above.

Anybody from ezcrew???

Jon Staines

Monday 14 April 2008 12:58:48 am

I think I see whats happening. The template list says its using content/view/embed.tpl but you've added the override to node/view/embed.tpl.

If you have access to edit the override.ini.append.php file by hand just change that entry. If not then use the interface to remove the one you've made and make a new override for content/view/embed.tpl.

See if that does the trick.

John Smith

Monday 14 April 2008 1:56:57 am

Hi Jon,

Thanks for your kind clue. What I did I clicked on the content/view/embed.tpl/ which gave me the big list of the templates and then created an override template that with the upper priority.

It is working fine now. Thanks for your kind help.

One more thing. I am trying to do the same thing for the

content/datatype/view/ezxmltags/quote.tpl

but it not working in either ways.

Is there anything simple in ezpublish 4.0. I have used 3.6 in which i used to create another template in

design/<siteaccess>/templates/datatype/ezxmltext/quote.tpl

to override the template in

design/base/override/templates/datatype/ezxmltext/quote.tpl

Any clue on this one please.....

I dont want to edit the base templates, just overrides only...

Jon Staines

Monday 14 April 2008 2:09:34 am

In 4.0 I believe you have to use an override for any changes, you can no longer just have the template in a similar path in a design extension (don't hold me to that as I haven't tried).

What entry do you have in override.ini.append.php for the quote? I'll have a look on a copy here and see if it works when I try.

John Smith

Monday 14 April 2008 2:14:33 am

Override ini

This is the custom one which I created....

[sl_quote]
Source=content/datatype/view/ezxmltags/quote.tpl
MatchFile=sl_quote.tpl
Subdir=templates

This is the already there by default...

[quote]
Source=content/datatype/view/ezxmltags/quote.tpl
MatchFile=datatype/ezxmltext/quote.tpl
Subdir=templates

Jon Staines

Monday 14 April 2008 2:22:21 am

I get the same problem, for some reason the priorities seem to work the other way around for this template. The later entry in the file takes preference. You could issue a bug or see if any of the eZ Crew can explain why it works this way around.

To use it, either make your override a lower priority or as your override would just replace the existing ezwebin override you could just edit that template (extension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tpl).

John Smith

Monday 14 April 2008 2:38:28 am

It worked.

I am not using ezwebin interface, just using plain_site.

So this seems bug....

EzCrew Pease Confirm.

Cheers.

John Smith

Tuesday 15 April 2008 12:47:30 am

Any body from EzCrew please???

eZ debug

Timing: Jan 31 2025 06:25:32
Script start
Timing: Jan 31 2025 06:25:32
Module start 'content'
Timing: Jan 31 2025 06:25:32
Module end 'content'
Timing: Jan 31 2025 06:25:32
Script end

Main resources:

Total runtime0.3086 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 587.9219180.8438
Module start 'content' 0.00520.0179 768.7656105.8359
Module end 'content' 0.02310.2855 874.6016535.2734
Script end 0.3086  1,409.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00381.2239200.0002
Check MTime0.00140.4611200.0001
Mysql Total
Database connection0.00070.220610.0007
Mysqli_queries0.242778.64931410.0017
Looping result0.00140.44211390.0000
Template Total0.285092.410.2850
Template load0.00070.228810.0007
Template processing0.284392.131910.2843
Override
Cache load0.00050.157110.0005
Sytem overhead
Fetch class attribute can translate value0.00100.320510.0010
XML
Image XML parsing0.00020.073910.0002
General
dbfile0.01835.9452200.0009
String conversion0.00000.001730.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