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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.