Skip to main content
Beacon9.ca
interactive media for the web

Main menu

  • Home
  • Portfolio
  • Labs
  • Contact

Search form

Drupal 7 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

The Latest Version

Version 1.1

  • Bug Fixes

Version 1.2

  • Added classes to first and last li elements
  • added id's to each ul element
File Attachment: 
sitemap_block-7-1.2.zip

Spread The Love

Tweet
  • Add new comment

Comments

Anonymous's picture

Thanks for a great module.

Permalink Submitted by Anonymous (not verified) on Thu, 01/13/2011 - 03:05

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.

  • reply
Hailey's picture

How do you style version 7

Permalink Submitted by Hailey (not verified) on Thu, 01/13/2011 - 03:08

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

  • reply
jack's picture

You shouldn't need classes on

Permalink Submitted by jack on Wed, 01/19/2011 - 10:11

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.

  • reply
Hailey's picture

Thanks for the reply! I am

Permalink Submitted by Hailey (not verified) on Wed, 01/19/2011 - 14:37

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.

  • reply
jack's picture

Hi Hailey - floating each ul

Permalink Submitted by jack on Fri, 01/21/2011 - 10:21

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; }

  • reply
Anonimys's picture

Critical Bug: Enabling this

Permalink Submitted by Anonimys (not verified) on Thu, 02/24/2011 - 03:00

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

  • reply
jack's picture

thanks for the report. I've

Permalink Submitted by jack on Thu, 02/24/2011 - 18:29

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

  • reply
jack's picture

Just uploaded the latest

Permalink Submitted by jack on Sat, 02/26/2011 - 15:33

Just uploaded the latest version with the bug fixes.

  • reply
Anonimys's picture

I get this error when I

Permalink Submitted by Anonimys (not verified) on Sat, 02/26/2011 - 21:46

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.

  • reply
Anonimys's picture

Ok fixed the install

Permalink Submitted by Anonimys (not verified) on Sun, 02/27/2011 - 02:38

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.

  • reply
jack's picture

Thanks for spotting that... I

Permalink Submitted by jack on Sun, 02/27/2011 - 13:41

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!

  • reply
jack's picture

Ok, version 1.2 is up. I

Permalink Submitted by jack on Sun, 02/27/2011 - 14:13

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?

  • reply
smtouhid's picture

it shows only the first

Permalink Submitted by smtouhid (not verified) on Thu, 08/18/2011 - 03:45

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

  • reply
jack's picture

you can set how deep the

Permalink Submitted by jack on Wed, 10/19/2011 - 15:48

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

  • reply
Push's picture

Hi J,

Permalink Submitted by Push (not verified) on Fri, 11/04/2011 - 01:35

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

  • reply
jack's picture

is it a "permission denied"

Permalink Submitted by jack on Sat, 11/05/2011 - 13:05

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

  • reply
Push's picture

No error, just that specific

Permalink Submitted by Push (not verified) on Sat, 11/05/2011 - 13:19

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

  • reply
jack's picture

hmm... strange... have you

Permalink Submitted by jack on Sun, 11/06/2011 - 19:38

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

  • reply

Add new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.

More information about text formats

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Email Facebook RSS

From the Labs

  • Drupal Social Popularity Module
    | 26 Nov
  • Drupal 7 Facebook Comments
    | 08 Nov
  • Drupal Mobile Redirect Module
    | 24 May
  • Drupal 7 Private Files Module
    | 30 Apr
  • Drupal 7 Sitemap Block Module
    | 11 Dec

View Labs

From The Portfolio

View Portfolio

Rank us on #rankable

Copyright © 2009-2010 BEACON9 All rights reserved. Admin Login Powered by Drupal