Share » Forums » Setup & design » override does not work

override does not work

override does not work

Wednesday 05 September 2007 6:56:59 am - 7 replies

Modified on Wednesday 05 September 2007 6:57:24 am by Guilherme Longo

Author Message

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

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu