Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | site_map_tweaks.2009-06-28a.patch | 12.31 KB | iva2k |
site_map_tweaks.2009-06-28.patch | 11.46 KB | iva2k | |
Comments
Comment #1
iva2k CreditAttribution: iva2k commentedI've added a couple of more tweaks, to call it a day:
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.
Comment #2
frjo CreditAttribution: frjo commentedThanks, I will test the patch shortly.
Comment #3
frjo CreditAttribution: frjo commentedI 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?
Comment #4
iva2k CreditAttribution: iva2k commentedSounds 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.
Comment #5
iva2k CreditAttribution: iva2k commentedDownload 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.
Comment #6
frjo CreditAttribution: frjo commentedThanks 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?
Comment #7
iva2k CreditAttribution: iva2k commentedIt 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:
... 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.
Comment #8
frjo CreditAttribution: frjo commentedNew 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!