Friday 28 January 2005 2:21:01 pm
I've come into an interesting scenario, and quite perhaps it's because I'm only a few months into eZ Publish (although insanely happy, best CMS I've worked with, by far). Currently I have three different pagelayouts setup as follows in my site override:
[flash]
Source=pagelayout.tpl
MatchFile=flash.tpl
Subdir=templates
Match[node]=2
[districtmap]
Source=pagelayout.tpl
MatchFile=districtmap.tpl
Subdir=templates
Match[node]=300
[regular_pagelayout]
Source=pagelayout.tpl
MatchFile=regular_pagelayout.tpl
Subdir=templates
So basically, I have two different pagelayouts for nodes 300 and 2, and then a default for all of the other ones. The problem is, I need to use the default pagelayout for the sitemap and when I access /content/view/sitemap (or the alias, either or), the layout for node 2 is used. Checking all the template variables, I've since come to realize that viewing the root node and the sitemap seem to be almost completely identical save for the uri ('/sitename' and '/content/view/sitemap') and the viewmode (root: 'full', sitemap: 'sitemap'). The problem is, from what I've dug up on the site, neither of these can be used to override the template that is used. All of the parameters you can use (e.g., node_id, object_id, parent_id, class, etc) have the same value when viewing either the root node or the sitemap! I assume this is because the sitemap is given the node_id that correlates to the node at which it is oriented to. Any idea how I can force the sitemap module to use the default layout template, and not the one specifically intended for the full view of the root node? I could use a section show comparison at the start of a page to include the default template if it is a sitemap view, or include the root template if it's a full root view, but this doesn't seem terribly elegant.. Thanks
|