Forums / Setup & design / override does not work

override does not work

Author Message

Guilherme Longo

Wednesday 05 September 2007 6:56:59 am

Mates, util now everthing was gona be all right but, when i tryed make change in one template and make an override, simply does'nt work.

I read 4 or 5 examples and i'm try understand based in one book that i have but all explanation is the same.

<b>my file that i want replace is in:</b>

<my_site>/extension/ezwebin/design/ezwebin/templates/user/login.

<b>the file that should be used instead:</b>

<my_site>/design/ezwebin_site/override/templates/login.tpl

<b>and my override config template in:</b>

<my_site>/settings/siteaccess/<language>/ override.ini.php

ok.

I set up my file like:

[login_page]
Source=/user/login.tpl
MatchFile=login.tpl
Subdir=templates

What have more to do. I want every time when somebody try to use login page, the system use the override for my login page.

Thank so much

Pascal Specht

Wednesday 05 September 2007 7:39:17 am

Hi Guilherme,

sometimes if not most time things automagically start working after clearing the cache. I usually issue a

cd www
rm -fr var/cache
rm -fr var/ezwebin_site/cache

Hope this may help you,
-Pascal

Guilherme Longo

Wednesday 05 September 2007 8:03:33 am

Ok, but here I am using windows and by web interface i cleared many times without hapen nothing.

;O( But ok, i will trying for help and thanks for your attencion

Kristof Coomans

Thursday 06 September 2007 12:24:16 am

Hi Guilherme

Unfortunately the location where you've placed your override template now has lower priority than the existing template. This is an example of the order in which templates will be searched for in designs:

extension/ezwebin/design/ezwebin_site/templates
extension/ezwebin/design/ezwebin_site/override/templates
extension/ezwebin/design/ezwebin/templates
extension/ezwebin/design/ezwebin/override/templates
extension/ezwebin/design/base/templates
extension/ezwebin/design/base/override/templates
extension/ezwebin/design/standard/override/templates
extension/ezwebin/design/standard/templates
design/ezwebin_site/templates
design/ezwebin_site/override/templates
design/ezwebin/templates
design/ezwebin/override/templates
design/base/templates
design/base/override/templates
design/standard/override/templates
design/standard/templates

However, instead of putting the override template at a location with higher priority, you can also just give your template another name, which doesn't occur yet in the normal template dir, like my_login.tpl (don't forget to adapt the MatchFile setting in your override.ini.php to this name change).

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Guilherme Longo

Thursday 06 September 2007 3:04:54 am

Kristof, thank so much for your help.

I got, putting my login.tpl em <b>/extension/ezwebin/design/ezwebin_site/override/templates</b> and changing the name of the extension/ezwebin/design/ezwebin_site/templates/login.tpl.

But i tryed before make using override.append.php located in /settings/siteaccess/<language>/

i putted by 2 ways the follow block:

[checkbox_admin]
Source=/user/login.tpl
MatchFile=/override/templates/login.tpl
Subdir=templates

and in anorther time

[checkbox_admin]
Source=/user/login.tpl
MatchFile=login.tpl
Subdir=templates

Can u help me where i'm wrong? The source is located in /user/login.tpl and the MatchFile in one of these 2 ways was correctly putted. (Or not?)

Kristof Coomans

Thursday 06 September 2007 5:34:03 am

Hi Guilherme

[my_login]
Source=/user/login.tpl
MatchFile=my_login.tpl
Subdir=templates

is the corect form, yes.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Guilherme Longo

Thursday 06 September 2007 6:59:58 am

lets try by another way because i did exactly like you told me.

I putted the files in a correct path

ezwebin/templates/user/login.tpl <- first priority

/ezwebin/override/templates/my_login.tpl <- Second Priority

so I added the block in my override.ini.append.php for:

<?php /* #?ini charset="utf-8"?

[checkbox_admin]
Source=/user/login.tpl
MatchFile=my_login.tpl
Subdir=templates

....
.....

*/ ?>

And I cleared the cache and nothing happen. The override does work. Is That all to do? have some kind of bug ?????

Guilherme Longo

Friday 07 September 2007 3:19:38 am

I found one way to make it work

OLD WAY:

[my_login]
Source=/user/login.tpl
MatchFile=/user/login.tpl
Subdir=templates

NOW:

[my_login]
Source=user/login.tpl <- I removed he slash for the begin
MatchFile=login.tpl <- In match file was nessesary put just the file name
Subdir=templates/user <- I put the complete sub dir here

* Was necessary create one folder named USER inside of template dir, because the default way for the main file is located in /template/user/login.tpl so, was necessary put the file in /override/template/user/

thats all.

Thank so much for all people helped me

eZ debug

Timing: Jan 18 2025 11:28:43
Script start
Timing: Jan 18 2025 11:28:43
Module start 'content'
Timing: Jan 18 2025 11:28:44
Module end 'content'
Timing: Jan 18 2025 11:28:44
Script end

Main resources:

Total runtime1.2600 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 587.7031180.8438
Module start 'content' 0.00691.1278 768.5469652.9844
Module end 'content' 1.13470.1253 1,421.5313341.0703
Script end 1.2600  1,762.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3269210.0002
Check MTime0.00170.1348210.0001
Mysql Total
Database connection0.00060.051210.0006
Mysqli_queries1.162092.22342110.0055
Looping result0.00220.17132090.0000
Template Total1.213496.320.6067
Template load0.00230.181720.0011
Template processing1.211196.117920.6056
Template load and register function0.00020.016310.0002
states
state_id_array0.00180.142110.0018
state_identifier_array0.00240.192620.0012
Override
Cache load0.00220.17571020.0000
Sytem overhead
Fetch class attribute can translate value0.00200.155440.0005
Fetch class attribute name0.00160.1258100.0002
XML
Image XML parsing0.00150.116940.0004
class_abstraction
Instantiating content class attribute0.00010.0044110.0000
General
dbfile0.00220.1786330.0001
String conversion0.00000.000330.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/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
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 43
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs