Add (node/block)-site_map.tpl.php support for custom theming
| Project: | Site map |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Hello,
I want to start by saying I really like this module and thank you for creating it. Hopefully my request isn't too much trouble.
Since the site map page does not output a heading1 page title (which is not a problem), I have to add that in the message area provided on the admin page. Putting a heading within a paragraph is not valid. I could also see wanting to put all kinds of other things in that area like multiple paragraphs, lists, images, or divs and none of these should be wrapped in paragraph tags. It would be perfect if it were just wrapped in the div and everything inside was added in the input field in the admin area.
So I would like to suggest removing the paragraph tags from the output of the site map message. I believe it is the first function in the module file. I am not a programmer so I don't know how to create a patch but I assume the code would look something like this.
/**
* Implementation of hook_help().
*/
function site_map_help($section) {
switch ($section) {
case 'sitemap':
$output = _sitemap_get_message();
return $output ? $output : '';
}
}Thanks

#1
Seems no more a case... page have a heading and sitemap message is correctly inside a paragraph - or I do not understand anything.
#2
Is this really fixed?
I'm interested in altering the position of site map message - in D6. Trying to access the message output in my theme. Is this possible?
It seems that using hook_help() to add a paragraph to the page makes the output less themeable.
It's not really help text is it? More of a description...
My theme inserts the help text above the breadcrumb; which is not where I want it.
I've used a hard coded text solution in my template.php
I'd much rather use the site map message from the module settings page - more usable for site editors.
This is the code in D6 sitemap.module:
* Implementation of hook_help().*/
function site_map_help($path, $arg) {
switch ($path) {
case 'sitemap':
$output = _sitemap_get_message();
return $output ? '<p>'. $output .'</p>' : '';
}
}
This is a fine module - I want to keep using it and for it to look good also.
#3
The hook_help is not for your output. Take a look - I'm not sure if there is a site_map.tpl.php available.
#4
A site_map.tpl.php would be awesome. I wish there was one. *sigh*
#5
Using hook_help to output "site_map_message" is an old leftover. Now that you brought it up I think it makes more sense to move it to theme_site_map_display().
What do you think?
A template_preprocess_site_map() plus a site_map.tpl.php is an interesting idea. If anyone knows how to do it please submit a patch. Otherwise I will take a look at it sooner or later.
#6
#7
Sitemap is more like a node... and someone else asked for a sitemap in a block... http://drupal.org/node/358426
#8
@frjo - Putting the message into a themeable place would be a superb development.
Since I'm using the theme_site_map_display() in my theme template.php, it would work well for me.
And it would certainly add to themabilty to have that tpl file.
#9
sorry, somehow I changed the title back in error. Correcting that.