Drupal 7 Sitemap Block Module

Apple Footer - Drupal Sitemap Block Module

A while ago, we built a sitemap block module for Drupal 6. With the release of Drupal 7 looming ever nearer we decided it was time to spend some time porting the module to the latest and greatest version of Drupal. It was a major code re-write, its got all the same functionality as before but we've utilized some of Drupal's helper functions to save us time (rather than doing all the hard work ourselves). Its much leaner and meaner than before (only half the file size!) and we're really happy with the result.

A big thanks to Elmar Weber on stackoverflow.com for posting the code that got us started.

Using the module

  • upload to your Drupal site and install
  • configure it - /admin/config/user-interface/sitemapblock
  • choose a region for the block - /admin/structure/block
Spread The Love

Comments

Anonymous's picture
posted by Anonymous on Jan 13 2011

Thanks for a great module. How do I style the version 7 links into two columns, as the module for version 7 doesn't seem to output unique classes, like the version 6 did. Your help would be greatly appreciated, as the footer looks like one long list right now.

Hailey's picture
posted by Hailey on Jan 13 2011

How do you style version 7 output into multiple columns. This version unlike the previous (drupal 6) doesn't seem to output unique classes.

jack's picture
posted by jack on Jan 19 2011

You shouldn't need classes on the list items themselves to style in columns. You can use the ID of the block and style the UL and LI elements. e.g.

#block-sitemap-block-sitemap-block ul li {}

Having said that I will post an update with the classes again.

Hailey's picture
posted by Hailey on Jan 19 2011

Thanks for the reply! I am able to to style the the links as per your suggestion, however still not sure how to put them in two rows, mind you I am no CSS wizard, just a beginner. I'll keep an eye on the update for the module or if you have any suggestions please post them.

jack's picture
posted by jack on Jan 21 2011

Hi Hailey - floating each ul should bring them along side each other. You might need to set the width and a min-height on the ul if you want to keep each one as a column. e.g.

#block-sitemap-block-sitemap-block { overflow:hidden; }
#block-sitemap-block-sitemap-block ul { display:block; float:left; width:100px; min-height:180px; }

Anonimys's picture
posted by Anonimys on Feb 24 2011

Critical Bug: Enabling this module in standard Drupal 7 installation breaks Permissions page.

jack's picture
posted by jack on Feb 24 2011

thanks for the report. I've just fixed the module and will upload it shortly!

jack's picture
posted by jack on Feb 26 2011

Just uploaded the latest version with the bug fixes.

Anonimys's picture
posted by Anonimys on Feb 26 2011

I get this error when I enable the new version:

Parse error: syntax error, unexpected ')' in .../sites/all/modules/sitemap_block/sitemap_block.module on line 13

I also get same error when I try to uninstall it.

Anonimys's picture
posted by Anonimys on Feb 27 2011

Ok fixed the install/uninstall error by removing the ); on current line 13! Cheers, it works now, no problems with permissions! Great module, hope you add those additional classes at some point and get this module on drupal.org as it is really cool and does a better job than footermap module.

jack's picture
posted by jack on Feb 27 2011

Thanks for spotting that... I hadn't had the chance to test it yet! I've committed the fix to version 1.1.

I'm working on adding the first and last classes right now!

jack's picture
posted by jack on Feb 27 2011

Ok, version 1.2 is up. I think this module is ready to be added to drupal.org so you probably wont see any more updates here.

I will post a link to the drupal project once I figure out how to do it all? Any one here have experience creating drupal projects?

smtouhid's picture
posted by smtouhid on Aug 18 2011

it shows only the first parent's child !! why ? please help me

jack's picture
posted by jack on Oct 19 2011

you can set how deep the menus should go in the module settings... have you tried changing that?

Push's picture
posted by Push on Nov 04 2011

Hi J,
Im trying to install this module onto drupal 7. I get to see the sitemap in the footer region, though I cannot get to admin/config/user-interface/sitemapblock as it is unavailable. Any forethoughts?

Regards
Push

jack's picture
posted by jack on Nov 05 2011

is it a "permission denied" error? if so, make sure you added the permission to your user.

Push's picture
posted by Push on Nov 05 2011

No error, just that specific menu is not unavailable under configuration...
Thnx for your prompt reply...
Cheers
Push

jack's picture
posted by jack on Nov 06 2011

hmm... strange... have you tried re-installing the module?

Bric's picture
posted by Bric on Apr 01 2012

I think it's a great module. Why don't publish it on drupal.org ? Drupal modules lacks in modules for sitemaps and your module fits perfectly. And so, you'll get some advertising :) (you can write on module presentation that is supported by you, with link )

Good luck!

Rank Us

Rank BEACON9 with a tweet...

Got Skillz?

If you've got ninja web skillz and are interested in working with us, get in touch!

Ready to rock? Get in touch for a free consultation & quote.Get in touch

Copyright © 2012 BEACON9 Media Ltd. All Rights Reserved.

Powered by Drupal A BEACON9 Creation