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

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:10:39
Script start
Timing: Jan 18 2025 19:10:39
Module start 'layout'
Timing: Jan 18 2025 19:10:39
Module start 'content'
Timing: Jan 18 2025 19:10:40
Module end 'content'
Timing: Jan 18 2025 19:10:40
Script end

Main resources:

Total runtime1.3426 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.1797152.6406
Module start 'layout' 0.00710.0037 741.820339.4766
Module start 'content' 0.01081.3305 781.2969552.8906
Module end 'content' 1.34140.0012 1,334.187516.1250
Script end 1.3425  1,350.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2391160.0002
Check MTime0.00130.0938160.0001
Mysql Total
Database connection0.00100.076910.0010
Mysqli_queries1.282595.5270600.0214
Looping result0.00110.0796580.0000
Template Total1.298296.720.6491
Template load0.00460.343420.0023
Template processing1.293596.346620.6468
Template load and register function0.00020.017010.0002
states
state_id_array0.00220.165410.0022
state_identifier_array0.00170.128620.0009
Override
Cache load0.00410.3077310.0001
Sytem overhead
Fetch class attribute can translate value0.00060.042720.0003
Fetch class attribute name0.00110.083450.0002
XML
Image XML parsing0.00050.038420.0003
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00080.0594160.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs