Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Site Map module tweak for Silverstripe 2.4 with nested URLs


Go to End


3 Posts   1614 Views

Avatar
Anatol

126 Posts

14 August 2010 at 4:58pm

Edited: 14/08/2010 4:58pm

Hi,

I found the site map module by chance and it saved quite a lot of time. Thanks for that!

Here is just one little tweak to use it in Silverstripe 2.4 with nested URLs enabled. In /sitemapmodule/code/SiteMapModule.php change

$page->URLSegment

to
$page->Link()

This code snippet needs to be changed in two places, in makeList() and in makeChildList().

The only other thing that might be worth mentioning is to make sure you keep the folder name "sitemapmodule". I renamed it for some reason to "sitemap" and the module could no longer find the css style sheets and the javascript which are defined in the same file in init(). Either rename the folder back to "sitemapmodule" or change the javascript and css requirements in init().

Thanks for this very useful module!

Cheers!
Anatol

Avatar
Willr

Forum Moderator, 5523 Posts

14 August 2010 at 9:43pm

You should email the module maintainer (DesignCity http://silverstripe.org/ForumMemberProfile/show/728) directly to see if they can release an updated version.

Avatar
sajok

Community Member, 82 Posts

21 August 2010 at 12:25pm

Edited: 21/08/2010 12:26pm

@Anatol

thank you so much for the tips.. the stylesheet was not included until I renamed the module folder name to "sitemapmodule".

:)