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.

eZ debug

Timing: Jan 18 2025 19:12:44
Script start
Timing: Jan 18 2025 19:12:44
Module start 'layout'
Timing: Jan 18 2025 19:12:44
Module start 'content'
Timing: Jan 18 2025 19:12:44
Module end 'content'
Timing: Jan 18 2025 19:12:44
Script end

Main resources:

Total runtime0.0187 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 587.8906152.6094
Module start 'layout' 0.00530.0025 740.500039.4141
Module start 'content' 0.00780.0089 779.914197.4297
Module end 'content' 0.01670.0020 877.343838.3047
Script end 0.0187  915.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002513.5573140.0002
Check MTime0.00116.0520140.0001
Mysql Total
Database connection0.00094.573410.0009
Mysqli_queries0.002211.534030.0007
Looping result0.00000.068710.0000
Template Total0.00147.610.0014
Template load0.00084.265410.0008
Template processing0.00063.320010.0006
Override
Cache load0.00052.626510.0005
General
dbfile0.00021.309480.0000
String conversion0.00000.038240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs