This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Setup & design » Site map in alphabetical order

Site map in alphabetical order

Site map in alphabetical order

Friday 16 April 2010 10:05:55 am - 6 replies


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?


Friday 16 April 2010 11: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 : ( 'sort_by' parameter ).

Let us know how it goes,

Friday 16 April 2010 11:11:25 am


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



Friday 16 April 2010 1:23:57 pm


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.



Friday 16 April 2010 2:51:26 pm

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.



Friday 16 April 2010 4:41:41 pm

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()}>

Wednesday 21 April 2010 9: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 happy.gif Emoticon



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

36 542 Users on board!

Forums menu

Proudly Developed with from