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
|