3.1: more docs needed on how the template override works

Author Message

Paul Borgermans

Wednesday 28 May 2003 9:50:43 am

From what I can tell, this is what I understand till now:

- the "automatic" recognition of override templates is no longer true, there needs to be a section in
/settings/siteaccess/<yoursite>/override.ini.append

- to be effective, a template has to have a corresponding section-entry in override.ini.append that looks like:

[<template_file_name_without_extension>]
Source= the base template it will override
MatchFile=the full filename of the template without path
Subdir=directory within /design/<yoursite>/override/
Match[]= array of class, node, or section id's
example:

[medium_image_polle]
Source=node/view/medium_class_5.tpl
MatchFile=medium_image_polle.tpl
Subdir=templates
Match[class]=5
Match[section]=6

Anything else that needs to be mentioned before I create a doc on this?

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Bård Farstad

Wednesday 28 May 2003 12:55:38 pm

This is pretty much how it works. You can still override a file by copying to your siteaccess. E.g. you can override pagelayout.tpl by copying it into your siteaccess ( design/mysite/templates/ or design/mysite/override/templates ).

--bård

Documentation: http://ez.no/doc

Volker Lenz

Friday 06 June 2003 1:08:16 pm

Thanks for this enlightening comment. Saved me hours of configuration. On monday, I hope to release the first productive ezp 3.1-01 site in Germany. (www.de.gtct.com). Isn't that cool ;-)

Gabriel Ambuehl

Friday 06 June 2003 4:03:16 pm

I have no luck.

I gave up on using the template editor as it doesn't seem to create any files at all (just to be sure I'm not running into permission problems I chowned the whole tree to user www so Apache HAS write rights, still no lucks).

So I figured I could do it by hand.

For the time being, I'm using design/user as my site access (I'm lazy blabla ;-). If I put pagelayout.tpl into user/templates it will show up without any troubles but stuff in user/templates/node/view seems to be ignored (but those put into standard WILL be used...).

I wanted to change the design of the Link class (clicking on the line should lead the user to the link directly not to a description of it). Considering it is class 11, I figured I'd add line_class_11.tpl to override/templates and be done with. Nothing happened. Then I tried my luck with override.ini (at some point I decided I don't like the name and renamed the template to line_link.tpl):

[line_link]
Source=node/view/full.tpl
MatchFile=line_link.tpl
Subdir=templates
Match[class]=11
Match[section]=1

but still no luck. I'm especially not sure whether I need to use line or full as source but neither seems to work...

I'm getting the impression that the override system is rather buggy. Or maybe it just hates my FreeBSD 4.8/mod_php 4.3.1 install as it seems to work for others. Oh, aside of having changed pagelayout.tpl, the templates are pretty much virgin.

Templates and overriding them is possibly the most powerful feature of ezpublish 3 but the documentation is nowhere up to it. It would be really nice if someone who actually got it to work and got some clue about how it works where to compile a one stop description of it...

Visit http://triligon.org

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