Forums / Setup & design / How to create an override template for node_list?

How to create an override template for node_list?

Author Message

Badger Mushroom

Friday 14 January 2005 8:27:32 am

Hi, I just installed EZpublish, and noticed the right toolbar contains this node_list. I was able to enable/disable node_list, but I would like to edit the node_list template.

But then inside the /design/standard/templates/toolbar/full/node_list.tpl, I was told to use override template instead. I was wondering where this node_list can be found under the 'never ending' template list so I can add an override. Thanks.

{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{section show=or($show_subtree|count_chars()|eq(0), $requested_uri_string|begins_with( $show_subtree ))}
{cache-block keys=$tool_id}
{default limit=5}
{section show=$sort_by|count|eq( 0 )}{set sort_by='published'}{/section}
{let node_list=cond( $treelist_check|eq( 'yes' ),
                         fetch( content, tree, hash( parent_node_id, $parent_node,
                                limit, $limit,
                                class_filter_type, exclude,
                                class_filter_array, array( 'folder' ),
					            sort_by, array( $sort_by, false() ) ) ),
                     fetch( content, list, hash( parent_node_id, $parent_node,
                            limit, $limit,
                            class_filter_type, exclude,
                            class_filter_array, array( 'folder' ),
				            sort_by, array( $sort_by, false() ) ) ) )}
<div class="toollist">
    <div class="toollist-design">
    <h2>{$title}</h2>
    <div class="content-view-children">
    {section name=Node loop=$node_list sequence=array(bglight,bgdark)}
        {node_view_gui view=listitem content_node=$Node:item}
    {/section}
    </div>
    </div>
</div>

{/let}
{/default}
{/cache-block}

Kristian Hole

Saturday 15 January 2005 5:10:20 am

If you have a template and want to change this (and override it). Copy it to your design in the same directory structure.
Example:
copy
/design/standard/templates/toolbar/full/node_list.tpl to
/design/YOURDESIGN/templates/toolbar/full/node_list.tpl

where YOURDESIGN is the one specified in the <i>SiteDesign</i> of <i>[DesignSettings]</i> in <i>site.ini.append.php</i> of your siteaccess.

Remember to clear the cache after you copied it.

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Badger Mushroom

Saturday 15 January 2005 9:43:29 am

Thanks,

I have three questions.

In my site.ini..., I saw the following:
[DesignSettings]
SiteDesign=plain
AdditionalSiteDesignList[]=base

What does AdditionalSiteDesignList mean, and how does 'base' design affect my 'plain' site design?

Also, in my /design/plain/templates/, there's no more directories that lead to /design/plain/templates/toolbar/full/. Does this mean I have to create my own and that EZPublish will be able to recongize my dir changes?

Kristian Hole

Monday 17 January 2005 1:05:04 am

In my site.ini..., I saw the following:
[DesignSettings]
SiteDesign=plain
AdditionalSiteDesignList[]=base

What does AdditionalSiteDesignList mean, and how does 'base' design affect my 'plain' site design?

The short answer is: When eZ publish looks for a template, it starts looking in SiteDesign. If it finds the template there it uses that, otherwise it looks through all your Additional designs (Specified in AdditionalSiteDesignList). If the template is not found there either, it looks in StandardDesign.

http://ez.no/ez_publish/documentation/incoming/design/siteaccess_configuration

Also, in my /design/plain/templates/, there's no more directories that lead to /design/plain/templates/toolbar/full/. 
Does this mean I have to create my own and that EZPublish will be able to recongize my dir chang

Yes. When you create the new dirs in the plain design eZ publish will automatically find them (but remember to clear the cache).

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

eZ debug

Timing: Jan 18 2025 18:22:19
Script start
Timing: Jan 18 2025 18:22:19
Module start 'content'
Timing: Jan 18 2025 18:22:20
Module end 'content'
Timing: Jan 18 2025 18:22:20
Script end

Main resources:

Total runtime0.7625 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.8594180.8125
Module start 'content' 0.00640.6269 768.6719557.9844
Module end 'content' 0.63330.1291 1,326.6563336.7422
Script end 0.7624  1,663.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5341210.0002
Check MTime0.00140.1885210.0001
Mysql Total
Database connection0.00090.121710.0009
Mysqli_queries0.689090.36941970.0035
Looping result0.00200.26331950.0000
Template Total0.726595.320.3632
Template load0.00210.277620.0011
Template processing0.724495.003820.3622
Template load and register function0.00020.021510.0002
states
state_id_array0.00120.159110.0012
state_identifier_array0.00090.122920.0005
Override
Cache load0.00180.2306310.0001
Sytem overhead
Fetch class attribute can translate value0.00150.199630.0005
Fetch class attribute name0.00120.153550.0002
XML
Image XML parsing0.00100.128330.0003
class_abstraction
Instantiating content class attribute0.00000.002760.0000
General
dbfile0.00180.2316270.0001
String conversion0.00000.000830.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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: 19
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs