You have no options for the title of the sitemap page. It can only say "Site map", be in the one spot, and can't have any css applied to it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

tic2000’s picture

Status: Closed (duplicate) » Active

This is not a duplicate.

Every page in Drupal is like this. You can create a page-sitemap.tpl.php in your theme folder and change the default style and title.
The only solution would be to add a title field in the settings page and use that title, but that won't change the style of it which is set in page.tpl.php and has nothing to do with this or any other module.

hass’s picture

Status: Active » Closed (duplicate)

No. All you said is wrong.

He is asking for adding a css class to the title and this will be possible with the new template

tic2000’s picture

Status: Closed (duplicate) » Active

Stop arguing if you have no idea what you're talking about.
The "Site map" title is not printed in any function or file in site_map module. The title is just set in site_map_menu().

Like any other title, it's on page.tpl.php and to be precise it's

 if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif; 

in Garland theme for example. Try removing that and you will see that "Site map" will disappear from the page.

If he wants css add to the title he has to add a class to that in his page.tpl.php file inside his theme folder. If he needs a special case for the sitemap than he has to create page-sitemap.tpl.php and clear the cache after.

hass’s picture

can't have any css applied to it

This IS possible with theming as you said yourself (e.g. page-sitemap.tpl.php template). I know what I'm talking about. And "Options" are NOT text.

tic2000’s picture

Version: 6.x-1.2 » 6.x-2.x-dev

Well, if you know what you're talking about you should know that the issue you said this is a duplicate of only outputs the $content variable in page.tpl.php and in some cases not even all of $content and it has nothing to do with the title.
Providing a page-sitemap.tpl.php is not this module job, or any module job mainly because the user needs to copy that file in his theme folder anyway.

All this module can do is to provide a field for the user to set a custom title which can override the default title. This is the only reason I let this issue open and maybe someone can provide a patch for it.

This is also a feature request and should go to the last dev version.

tic2000’s picture

Status: Active » Needs review
FileSize
1.74 KB

No feature request can be solved without a patch.

hass’s picture

Status: Needs review » Needs work

There is a context sensitive bug that need to be fixed:

Wrong:

t('Page title that will be used on the !link', array('!link' => l('site map page', 'sitemap')))

Correct:

t('Page title that will be used on the <a href="!link">site map page</a>.', array('!link' => url('sitemap')))
tic2000’s picture

Status: Needs work » Needs review

And why would that be a context sensitive bug?

tic2000’s picture

FileSize
1.75 KB
hass’s picture

The string "site map page" wasn't translatable in the context of the sentence.

Code wise RTBC.

hass’s picture

Status: Needs review » Reviewed & tested by the community

Works as advertised.

frjo’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 6-2-dev.

I removed the arg(0) == 'sitemap' since this is in the page callback.

Thanks a lot for helping out with this module! It's surprisingly popular so I feel very good about getting it more polished and useful.

tic2000’s picture

It's in the page callback, but some one may decide to call the function directly in his own module and maybe doesn't want the same page title.

Status: Fixed » Closed (fixed)

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