Forums / Setup & design / Override templates

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

eZ debug

Timing: Jan 18 2025 15:58:06
Script start
Timing: Jan 18 2025 15:58:06
Module start 'content'
Timing: Jan 18 2025 15:58:07
Module end 'content'
Timing: Jan 18 2025 15:58:07
Script end

Main resources:

Total runtime0.9599 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.7266180.8438
Module start 'content' 0.00560.8074 769.5703650.1016
Module end 'content' 0.81300.1465 1,419.6719341.0859
Script end 0.9596  1,760.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.4529210.0002
Check MTime0.00160.1687210.0001
Mysql Total
Database connection0.00090.094810.0009
Mysqli_queries0.871990.83262070.0042
Looping result0.00300.31252050.0000
Template Total0.934297.320.4671
Template load0.00210.217920.0010
Template processing0.932197.107320.4661
Template load and register function0.00010.015210.0001
states
state_id_array0.00070.071810.0007
state_identifier_array0.00090.093520.0004
Override
Cache load0.00190.1934440.0000
Sytem overhead
Fetch class attribute can translate value0.00210.223250.0004
Fetch class attribute name0.00170.175770.0002
XML
Image XML parsing0.00320.333650.0006
class_abstraction
Instantiating content class attribute0.00000.002590.0000
General
dbfile0.00530.5546270.0002
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs