Forums / Setup & design / Site map in alphabetical order

Site map in alphabetical order

Author Message

Juan Asencio

Friday 16 April 2010 1:05:55 am

Hi,

I would like to show the content of my sitemap in alphabetical order. Right now I can see all the content of the website, but I don't know how to order it by name.

I don't have any idea where to start, any suggestions?

Regards

Nicolas Pastorino

Friday 16 April 2010 2:00:54 am

Hi Juan,

You can override the sitemap view mode of the '/content/view/' view. If using ezwebin or ezflow, here is the template you can override and modify : extension/ezwebin/design/ezwebin/templates/node/view/sitemap.tpl.

You will see various call to the following template fetch function :

{def $children = fetch('content', 'list', [...])}

the sort method of which you can override as explained there : http://ez.no/doc/ez_publish/technical_manual/4_x/reference/modules/content/fetch_functions/list ( 'sort_by' parameter ).

Let us know how it goes,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Juan Asencio

Friday 16 April 2010 2:11:25 am

Nicolas,

Thank you for your reply, I will have a look at it and let you know how did it go.

Cheers,

Juan.-

Juan Asencio

Friday 16 April 2010 4:23:57 am

Nicolas,

Now is almost working, I can control which content I want to show.

But how can I show only the content of the site access where the user is?

I can't figure it out where to edit the address where the sitemap link is directed to, always keep been node 2.

Cheers,

Juan.-

Juan Asencio

Friday 16 April 2010 5:51:26 am

Ok, now I have hardcoded the link on the design/my_design/templates/page_header_links.tpl as:

<li id="sitemap"><a href={"/ezpublish-4.3b/index.php/.../content/view/sitemap/63"}...

instead of:

<li id="sitemap"><a href={$pagedesign.data_map.site_map_url.content|ezurl}...

But is a way to direct the site_map_url to a specific node?

Because this solution will not work for my other siteaccess, unless I make my_design directory for each siteaccess.

Any suggestions are welcome, I'm sure must be a better way to do this.

Regards,

Juan.-

Peter Keung

Friday 16 April 2010 7:41:41 am

This is where INI files + ezurl() operator are a good solution. For example, if you want to link to different root nodes per siteaccess, you use something like:

<a href={concat( 'content/view/sitemap/', ezini( 'NodeSettings', 
'RootNode', 'content.ini' ) )|ezurl()}>

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

Juan Asencio

Wednesday 21 April 2010 12:10:57 am

Hi everybody,

Thank you for your replies.

Peter, your comment show me the right way to do it. Now I understand what the ezini it is for :)

Cheers,

eZ debug

Timing: Jan 18 2025 00:00:35
Script start
Timing: Jan 18 2025 00:00:36
Module start 'content'
Timing: Jan 18 2025 00:00:37
Module end 'content'
Timing: Jan 18 2025 00:00:37
Script end

Main resources:

Total runtime1.7755 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 588.8438180.8359
Module start 'content' 0.00751.5392 769.6797633.3359
Module end 'content' 1.54670.2287 1,403.0156341.0938
Script end 1.7754  1,744.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2101210.0002
Check MTime0.00140.0785210.0001
Mysql Total
Database connection0.00110.062610.0011
Mysqli_queries1.682594.76242090.0081
Looping result0.00270.14972070.0000
Template Total1.745798.320.8728
Template load0.00180.103720.0009
Template processing1.743898.218420.8719
Template load and register function0.00020.011910.0002
states
state_id_array0.00090.052610.0009
state_identifier_array0.00160.087920.0008
Override
Cache load0.00170.0940480.0000
Sytem overhead
Fetch class attribute can translate value0.00210.116540.0005
Fetch class attribute name0.00190.104290.0002
XML
Image XML parsing0.00140.076140.0003
class_abstraction
Instantiating content class attribute0.00000.001090.0000
General
dbfile0.00460.2606340.0001
String conversion0.00000.000330.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs