Override templates

Author Message

Tim Dickinson

Tuesday 01 August 2006 4:45:15 pm

Hi all,

I can't work out why this isn't working.

I wasnt to display a javascript inserted table (sort of like a banner) under the content of a folder.

What I have done is create an override template (called folder2.tpl) for full view of folders of that node ID (72).

In that override template I have the following:

<div class="content-view-full">
    <div class="class-folder">

        <h1>{attribute_view_gui attribute=$node.object.data_map.name}</h1>
{attribute_view_gui attribute=$node.object.data_map.short_description}

    </div>
</div>

{literal}<script language='javascript' src='http://www.javascripturl.com/app.aspx?id=1'></script>{/literal}

and at the bottom of my siteaccess override.ini.append.php I have:

[folder2]
Source=node/view/full.tpl
MatchFile=folder2.tpl
Subdir=templates
Match[class_identifier]=folder
Match[node]=72

I cleared the cache, but the override isn't working for some reason.

Anyone got any ideas?

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Softriva .com

Wednesday 02 August 2006 1:05:08 am

If you are using linux try to clear the cach as:

$ ./bin/shell/clearcache.sh --clear-all

Try to remove this line

Match[class_identifier]=folder

George Michaelides

Wednesday 02 August 2006 2:08:27 am

If you want all folders under that node to inherit this override you should create a section and do a match on section instead of node. Specifically:

Match[section]=xx

Otherwise it will only affect the nodeid you specified.

For more info on sections see http://ez.no/doc/ez_publish/technical_manual/3_8/concepts_and_basics/content_management/sections

Don't forget to change permissions for the section as by default, guest user has no access to read content from it.

www.jegodesigns.com
www.jegodesigns.eu

Tim Dickinson

Wednesday 02 August 2006 3:26:24 am

Thanks for the tips guys.

I tried removing the class in override.ini and cleared the cache using clearcache.sh but that doesn't seem to have solved my problem. The override still isn't working at all.

I don't really want to create a new section, but thanks for the suggestion. It is only for this one folder that I want to display the javascript. I would have liked to include it in the description, but that is xml and doesn't like javascript ;)

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Tim Dickinson

Wednesday 02 August 2006 4:33:19 am

Not quite sure what fixed it, but after moving the override to the top of the override.ini.append.php file and clearing the cache in every way I knew how has fixed the problem.

Thanks for the help people :-)

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Claudia Kosny

Saturday 12 August 2006 7:31:22 pm

Hi Tim,

just for future reference:
EZ works through the rules in override.ini from top to bottom. Unfortunately it stops looking for overrides the moment it has found one, no matter whether there are any more specific overrides further down the file.

As there is an override for folders in general near to the top in the standard override.ini.append.php, EZ never looks for other rules unless you really put them on top of the file. If you use the admin interface for managing overrides, make sure to give it priority 1 (which will actually write the rule on top of the file).

This is also described here:
http://ez.no/doc/ez_publish/technical_manual/3_8/templates/the_template_override_system section Multiple / conflicting overrides

Claudia

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