Forums / General / Site map template?

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

eZ debug

Timing: Jan 31 2025 01:34:35
Script start
Timing: Jan 31 2025 01:34:35
Module start 'content'
Timing: Jan 31 2025 01:34:35
Module end 'content'
Timing: Jan 31 2025 01:34:35
Script end

Main resources:

Total runtime0.2629 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 587.8047370.3125
Module start 'content' 0.00740.0141 958.11721,009.5781
Module end 'content' 0.02150.2414 1,967.69533,897.3359
Script end 0.2629  5,865.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00471.7926200.0002
Check MTime0.00140.5241200.0001
Mysql Total
Database connection0.00060.247210.0006
Mysqli_queries0.167263.58661410.0012
Looping result0.00150.56781390.0000
Template Total0.240691.510.2406
Template load0.00110.427110.0011
Template processing0.239591.079610.2395
Override
Cache load0.00070.272310.0007
Sytem overhead
Fetch class attribute can translate value0.00170.654910.0017
XML
Image XML parsing0.00030.102610.0003
General
dbfile0.00411.5469200.0002
String conversion0.00000.002630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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