Forums / Setup & design / Override.ini.append - sitemap-listing of all child nodes..

Override.ini.append - sitemap-listing of all child nodes..

Author Message

Valentin Svelland

Thursday 11 September 2003 5:03:09 am

I'd like to do a sitemap-listing of a node including content of several classes and childfolders, but I can't get it right yet:

My changes in override.ini.append (the first one works fine listing out our organizations employees, the second one is supposed to include both employees and their departements):

[sitemap_employee]
Source=node/view/sitemap.tpl
MatchFile=sitemap_employee.tpl
Subdir=templates
Match[node]=138

[sitemap2]
Source=node/view/sitemap.tpl
MatchFile=sitemap2.tpl
Subdir=templates
Match[node]=138

I know that [sitemap2] isn't right, anyone knows?

Karsten Jennissen

Thursday 11 September 2003 5:08:05 am

I am not sure I understand exactly what you are trying to do, but having the same match criteria and the same source template will not work.

Are you trying to append the second template to the first to be displayed at the same time?

Bjørn Kaarstein

Thursday 11 September 2003 5:09:40 am

Hi Valentin.

Hope you got your speech right :)

This is probably due to the fact that you are overriding the same node. If you chance succession, I think you'll find out that the one on top will be used.

Maybe you could use a switch/case statement in your template to achieve what you want? If this is supposed to be controlled per user you could check on the usergroup.

Regards Bjørn

Valentin Svelland

Thursday 11 September 2003 5:30:34 am

Hehe, poor question and good answers. Thanks so far.

What I'm trying to do is make an alternative sitemap-listing of the content of node 138. The alternative listing will be in printer friendly layout and without page navigator. Also the alternative listing should include all of the subcontents, not only one of the classes.

My node-tree:

Organization (node=138, class=folder)
Administration (class=unit)
- Employee 1 (class=employee)
- Employee 2
- Employee 3
Support (class=unit)
- Employee 4 (class=employee)
- Employee 5
- Employee 6

and so on...

I want a sitemap listing sorted by parent_nodes with their content alfabetical like this:

Administration - [phonenumber] [email]
Employee1 - [phonenumber] [email]
Employee2 - [phonenumber] [email]
Employee3 - [phonenumber] [email]

Support
Employee4 - [phonenumber] [email]
Employee5 - [phonenumber] [email]
Employee6 - [phonenumber] [email]

How to?

(also listed as printer friendly output, but that I figured out..)


As you've pointed out, I have to do a switch or something to make this possible. But is it possible to choose which override to use through the use of URLs for example?

Valentin Svelland

Monday 15 September 2003 12:16:01 am

First problem:
To do several sitemap listings matched to the same node; create copies of design/standard/templates/node/view/sitemap.tpl (for example sitemap2.tpl in the same folder) - and override these in in your own design through override.ini.append if necessary.

Second problem:
However, to be able to traverse my folder structure with employees and their units, I guess I should make instances of the class "employee" children to instances of the class "unit" - and modify my menulisting to reflect units as well as folders..

Paul Forsyth

Monday 15 September 2003 12:46:39 am

I think what the others have said still stands. You only have one sitemap per node to match with, so in the template code for that template you will need to perform some logic to distinguish between the different views you need.

You haven't made clear how each of your overrides differs. How will ez know how to make the distinction between one override and another. Once you know that you can probably do the same thing with template logic.

Paul