Overriding a master folder

Author Message

RB RB

Thursday 20 November 2003 8:53:58 am

I am in the process of implementing the following structure:

ROOT FOLDER
- M Directory (mdirectory section)
-- Construction
-- Design
-- Materials

The folder 'M Directory' relates to the section 'mdirectory section'. The folders construction, design and materials contain objects of a class I created called 'mdirectory_class'. I have implemented 2/3 of the section, but I am having one problem.

I have a template 'full_view_mdirectory_folder.tpl' to display the contents of folder 'M Directory', using this code:

<table class="member_list" cellpadding="0" cellspacing="0" border="0">
{* Loop through all nodes that we just fetched. *}
{section name=Child loop=$children}

{* Output the name as a link to the node containing the member. *}
<tr>
<td>
<a href={$:item.url_alias|ezurl}>{$:item.name}</a>
</td>
</tr>
{* End of loop. *}
{/section}
</table>
{/let}

When I run the template all the relevant folders are displayed and when I select a particular folder, such as 'Construction', summary details (name,description) of the relevant objects are displayed on a new page. Clicking on name brings up another new page with complete details for a particular object using another template 'full_view_mdirectory'.

Summary details of objects by default are displayed using the template 'full_view_mdirectory_folder.tpl'. I created another template 'full_view_mdirectory_category' to override the above template to display the summary objects within the folders construction, design and materials differently from the 'M Directory' Folder. But it is not being picked up and I am some what confused. I have tried to override the template (using Match[node]) but I am not sure if what I have done is correct (P.S I have cleared all caches). A snippet of the relevant section from the override.ini.append file is below:

Here's the snippet:

[full_view_mdirectory_folder]
Source=node/view/full.tpl
MatchFile=full_view_mdirectory_folder.tpl
Subdir=templates
Match[class]=1
Match[section]=6

[full_view_mdirectory]
Source=node/view/full.tpl
MatchFile=full_view_mdirectory.tpl
Subdir=templates
Match[class]=16
Match[section]=6

[full_view_mdirectory_category]
Source=node/view/full.tpl
MatchFile=full_view_mdirectory_category.tpl
Subdir=templates
Match[class]=1
Match[section]=6

Am I right in trying to override the template? Any advice would be much appreciated. Many Thanks

RB

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 19 2025 00:15:32
Script start
Timing: Jan 19 2025 00:15:32
Module start 'layout'
Timing: Jan 19 2025 00:15:32
Module start 'content'
Timing: Jan 19 2025 00:15:33
Module end 'content'
Timing: Jan 19 2025 00:15:33
Script end

Main resources:

Total runtime0.6355 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 587.9141152.6250
Module start 'layout' 0.00510.0026 740.539139.4453
Module start 'content' 0.00770.6265 779.9844417.5625
Module end 'content' 0.63420.0013 1,197.54698.1641
Script end 0.6355  1,205.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4976160.0002
Check MTime0.00140.2145160.0001
Mysql Total
Database connection0.00070.116010.0007
Mysqli_queries0.591393.0484460.0129
Looping result0.00030.0519440.0000
Template Total0.609395.920.3046
Template load0.00200.320820.0010
Template processing0.607295.544220.3036
Template load and register function0.00020.033010.0002
states
state_id_array0.00080.121210.0008
state_identifier_array0.00070.104520.0003
Override
Cache load0.00170.2674490.0000
Sytem overhead
Fetch class attribute can translate value0.00050.086210.0005
Fetch class attribute name0.00070.107210.0007
XML
Image XML parsing0.00010.018210.0001
class_abstraction
Instantiating content class attribute0.00000.000810.0000
General
dbfile0.00150.2385100.0002
String conversion0.00000.001140.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
1content/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
5content/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: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs