Great module, simple but powerful!

I found few tweaks very handy for a couple of my websites, so I rolled a patch here. The new features in this patch are:

  • site_map_count_threshold, similar to #213791: Limit display of terms of free-tagging vocabulary by node count - limits which categories are displayed
  • site_map_forum_threshold - same as above, but separate setting for forums, so one can have empty forums displayed while empty categories are not
  • site_map_rss_links_before - option to move RSS links to the left, creates nice visual alignment
  • Removed "This is a" from "This is a link to a content RSS feed"... just bugs me.
  • Wrapped the above into a themable fieldset which is collapsed by default. Who needs a description of what is RSS used for these days? Ok, some people need that - they can uncollapse it by one click. It will be fun for them.

See example of how it works on my test site: http://qphy.org/sitemap

Please review for committing into 6.x-1.x-dev.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iva2k’s picture

I've added a couple of more tweaks, to call it a day:

  • Added CSS file that removes list bullets from site map items (not configurable)
  • Changed forum links to always point to forums, not taxonomy (not configurable)

The below patch also includes all tweaks from previous patch, so there is no need to look at the previous one.

Please review this one for committing into 6.x-1.x-dev.

frjo’s picture

Assigned: Unassigned » frjo

Thanks, I will test the patch shortly.

frjo’s picture

I have committed code to 6-dev that is inspired by and borrowing a lot from the patch by iva2k.

Please try it out and report back here what you think.

* Added a site_map.css with a number of default styles and a setting to turn it off.
* site_map_term_threshold
* site_map_forum_threshold
* site_map_show_rss_links none/left/right

iva2k what do you think of the changes I made and the css styles I added? Do you think they are general enough to be useful?

iva2k’s picture

Sounds good. I downloaded the latest tarball, but there are no changes that CVS log shows... weird, all old files, even .css file is missing. Looks like drupal.org scripts are acting up. I will let it settle for a while and try again tomorrow.

iva2k’s picture

Status: Needs review » Reviewed & tested by the community

Download from dupal.org did not change - it seems stuck back in time. I checked out CVS 1.x-dev branch, and changes are there.

@frjo
I like what you did. Your edits look solid, and it makes more sense to expand site_map_show_rss_links as you did than add extra setting. The only thing I needed to fix for myself is CSS (removed list-style-type & list-style-image in .menu) - with acquia_marina theme that was giving both a disc and a right-double-angle-quote from the theme. I guess CSS will be hard to make universal. I kinda missed the collapsible legend one-liner, but I always can patch it back.

frjo’s picture

Status: Reviewed & tested by the community » Needs review

Thanks for taking time to review this!

The tarball is I believe rebuilt every 12 hour for dev versions.

The CSS is a problem, for the menu I was trying to override the Drupal core CSS but as you discovered it can easily clash with the theme. This is tricky, any bright ideas?

I decided to remove the collapsible legend because I have the commentrss module on my site and the legend tells users to separate content RSS feeds from comment RSS feeds. But now when I think about it the legend is only really necessary when the comment RSS module is active.

What do you think of simply removing the legend when the commentrss module is not active?

iva2k’s picture

Status: Needs review » Reviewed & tested by the community

It looks like ftp.drupal.org has nothing to do with the stale files. I downloaded it using FF and the change is there. Seems like Google Chrome can't re-download the newer tarball. Never seen it do that before.

I agree - it makes more sense when the legend is shown only when comment RSS is present.

For CSS - I think the issue is that there are multiple ways to deal with the <li> decoration. Your CSS goes only half way - you either should remove any background images as well:

#site-map ul.menu li {
  list-style-type: disc;
  list-style-image: none;
  background-image: none;
}

... or don't touch the menus at all, and let current theme's CSS to handle it.

The choice is a matter of preference, and will depend on theme. I'm minimalist, so my preference is not get fancy and inconsistent. I just left ul.menu li clause out of my installation. Acquia_marina themes the menus OK.

frjo’s picture

Status: Reviewed & tested by the community » Fixed

New commit to 6-dev.

* Removed the #site-map ul.menu li CSS
* Made the legends only show when commentrss module is active.

Thanks for taking the time for this!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.