Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » RockMapCSS

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1430 Views
  • dospuntocero
    Avatar
    Community Member
    54 Posts

    RockMapCSS Link to this post

    RockMapCSS: SlickMapCSS SilverStripe Module

    Hi guys this is my very first good contribution to the silverstripe community

    This module simplifies the task of make sitemaps up to 3 levels deep from silverstripe made websites using Matt Everson's SlickMapCSS. the sitemap is completely navigable so you can use as a reference for starting projects as well

    The number of columns is automatically calculated, instead of meyer's reset I have used YUI reset-fonts-grids for reseting purposes
    just copy the module in your root folder and do a dev/build.

    navigate to yoururl/sitemap (if this is not working... you can create your own page from the create list)

    you can see it live here: http://gbp.dospuntocero.cl/mapa-del-sitio/

    i have fixed some issues, i will follow ingo's ideas when i have a little more time, because i need to learn how to do that.. please download the new version:

    new in this version:

    • css issues on third level fixed
    • now the column count seems to work ok
    • auto creation of rockmap inside the sitetree if not exists

    please note i cant delete the tar.gz file, so i have updated the new version inside a zip file.
    the module is in the following subversion server: http://proyectos.dospuntocero.cl/open/RockMapCSS

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: RockMapCSS Link to this post

    Such an awesome way to display a sitemap, great to see that being possible in SilverStripe without too much effort now

    Some tips:
    function NumberOfPagesAtRootLevel(){
    return $this->SiteMap()->Count();
    }
    You might want to introduce caching the SiteMap() return value into a private property on the class, to avoid calling the whole thing twice ($NumberOfPageAtRootLevel and <% control SiteMap >). This will effectively double the rendering time, which can be quite significant on larger pages. On that note, you should probably add a disclaimer to the module README that its only suitable for SilverStripe installations with less than 100 pages, otherwise the memory usage will get quite excessive iwhtout further optimization.

    You can also make the module more "pluggable" by using DataObjectDecorator instead of extending Page, in order to avoid forcing people into a certain inheritance tree.
    And one last little hint: With Markdown instead of plaintext in your README file, you can apply richer formatting. We're planning to convert these files into HTML automatically on the ss.org/modules page soon. See http://open.silverstripe.com/browser/modules/cmsworkflow/trunk/README.md for an example

  • qlex
    Avatar
    Community Member
    68 Posts

    Re: RockMapCSS Link to this post

    Hi dospuntocero,
    great idea for a module and it looks awsome.

    tried to install it on two of my SS-powered sites and got the following error after copying the module and dev/build'ing:

    [Warning] Can't find sitemap/0 in stage Stage
    GET /kombus/dev/build?flush=1

    Line 402 in /users/wartabudpl/www/kulesza.net/kombus/sapphire/core/model/Versioned.php

    any idea what could cause this ?
    cheers,
    qlex

  • dospuntocero
    Avatar
    Community Member
    54 Posts

    Re: RockMapCSS Link to this post

    @qlex, i have updated the module a bit, i have found some errors, please upload using the zip in the first post or do a checkout using the svn server i have provided

  • qlex
    Avatar
    Community Member
    68 Posts

    Re: RockMapCSS Link to this post

    @dospuntocero:
    thanx a bunch, seems to correct my problem.

    a question, how to add meta tag description to the elements of sitemap - maybe upon hover one could see the description (which i added in the CMS) - at least for main menu items ?

    cheers,
    qlex

  • dospuntocero
    Avatar
    Community Member
    54 Posts

    Re: RockMapCSS Link to this post

    i have made a new version for the module, now its a controller extension, you just need to call /sitemap and will work

    http://www.silverstripe.org/rockmapcss-module-2/

    1430 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.