Add (node/block)-site_map.tpl.php support for custom theming

chadcross - April 15, 2008 - 20:36
Project:Site map
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

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

hass - September 16, 2009 - 22:38
Status:active» fixed

Seems no more a case... page have a heading and sitemap message is correctly inside a paragraph - or I do not understand anything.

#2

eff_shaped - September 21, 2009 - 15:54

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

hass - September 21, 2009 - 16:46

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

eff_shaped - September 22, 2009 - 09:21

A site_map.tpl.php would be awesome. I wish there was one. *sigh*

#5

frjo - September 22, 2009 - 12:37
Version:5.x-1.2» 6.x-1.x-dev
Status:fixed» active

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

hass - September 22, 2009 - 13:55
Title:Site Map Message Output» Add site_map.tpl.php support for custom theming

#7

hass - September 22, 2009 - 14:00
Title:Add site_map.tpl.php support for custom theming» Add (node/block)-site_map.tpl.php support for custom theming

Sitemap is more like a node... and someone else asked for a sitemap in a block... http://drupal.org/node/358426

#8

eff_shaped - September 22, 2009 - 14:14
Title:Add (node/block)-site_map.tpl.php support for custom theming» Site Map Message Output

@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

eff_shaped - September 22, 2009 - 14:17
Title:Site Map Message Output» Add (node/block)-site_map.tpl.php support for custom theming

sorry, somehow I changed the title back in error. Correcting that.

 
 

Drupal is a registered trademark of Dries Buytaert.