Site map template?

Site map template?

Monday 13 November 2006 10:02:43 am - 8 replies

Author Message

kracker (the)

The Doctor

Monday 13 November 2006 10:12:46 am

I would create a template override for pagelayout.tpl

<i>http://ez.no/products/ez_publish/documentation/customization/custom_design/override_templates
http://ez.no/doc/ez_publish/technical_manual/3_8/templates/the_template_override_system
</i>

//kracker
<i>Modest Mouse - Here it comes</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

David Jones

Thursday 11 January 2007 5:52:55 am

This is what I would like to do. I have used many overrides in my site but I can't see how to set this override.

How do you define an override for the sitemap?

André R.

Thursday 11 January 2007 8:33:34 am

If you have a override design I think you can just place a template called sitemap.tpl in
design/'design_name'/templates/node/view/

Take a look at how ezwebin does it.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

David Jones

Friday 12 January 2007 3:23:54 am

Thanks but that doesn't quite work.

What I want to be able to do is override the pagelayout for the sitemap.

I have manage to use the overrides to create 2 page layouts. One for the home page. One for the rest of the site.

The sitemap is picking up the one for the home page. I want it to use the other one (or a completely new one). But i can't isolate the site map (it's not a class, and doesn't have a node id)

This must surely be possible.

Thanks in advance

Claudia Kosny

Friday 12 January 2007 5:21:24 am

Hi David

You can use the same parameters as for node/view/*.tpl as sitemap is just a special view mode for the node view (just like full or line). Then add the parameter to limit the override to this special viewmode.

Example:

[pagelayout_sitemap]
Source=pagelayout.tpl
MatchFile=full/sitemap_pagelayout.tpl
Match[viewmode]=sitemap
Match[node]=66

Claudia

David Jones

Friday 12 January 2007 6:44:16 am

Thanks claudia

That seems to make sense but still doesn't seem to work.

What does

Match[node]=66

Need to be set to? Where did you get the 66 from?

Thanks

David Jones

Friday 12 January 2007 6:58:49 am

forget that...

It was being overridden by a later override.

Thanks, works brilliantly.

Can you do something similar with search results?

What would the view mode be?

Claudia Kosny

Friday 12 January 2007 7:17:36 am

Hi David

EDIT: Looks like I should update the page more often before answering something... Anyway, below the answer to your question regarding the node id. I don't know how to have several overrides for the searchresult (unless you are into kernel hacking), so I can't help you there. /EDIT

The 66 was just an example for a node id, I forgot to explain this, sorry.

If you just use

[pagelayout_sitemap]
Source=pagelayout.tpl
MatchFile=full/sitemap_pagelayout.tpl
Match[viewmode]=sitemap

without the nodeid, this override will be used for all sitemaps.

But as you want it only for a specific part of your webpage you have to specify this part by e.g.
-- Match[node]=xx ==> then this pagelayout will be used for the sitemap view of node xx
-- Match[section]=yy ==> then this pagelayout should be used for the sitemap of all nodes within this section
--Match[parent_node] ==> ...
and all the other match options in the override conditions for node/view/*.tpl

I have only used the Match[node] condition which was working fine, but the others should work as well.

Claudia

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.