Site map template?

Author Message

Jorge estévez

Monday 13 November 2006 10:02:43 am

How to define the template of the SiteMAP page (it always uses pagelayout.tpl) I would like to use another template.

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

kracker (the)

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

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

Main resources:

Total runtime0.0199 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 587.7891152.6094
Module start 'layout' 0.00870.0035 740.398439.4141
Module start 'content' 0.01220.0057 779.812597.3984
Module end 'content' 0.01780.0020 877.210942.3047
Script end 0.0198  919.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003115.4046140.0002
Check MTime0.00125.8684140.0001
Mysql Total
Database connection0.00178.474410.0017
Mysqli_queries0.003417.216430.0011
Looping result0.00000.075610.0000
Template Total0.00178.610.0017
Template load0.00094.554610.0009
Template processing0.00083.979810.0008
Override
Cache load0.00063.220310.0006
General
dbfile0.00031.293480.0000
String conversion0.00000.036040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs