[
https://jira.codehaus.org/browse/MSITE-651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=307398#comment-307398
]
Dennis Lundberg commented on MSITE-651:
---------------------------------------
Hi Andreas,
I've had a look at this and have a few suggestions to a solution.
At first I thought that I could just check if the menu had any items and skip
it if it didn't have any. It removes the empty headings, but has unwanted side
effects.
My current solution is to always show the menus of type "ref", i.e. parent,
module and reports, even if they don't have any menu items. That means that
they will show up as headings in the sitemap, but they will not have any links
below them. How does that sound to you?
> Unnecessary "parent" and "modules" menus show up as empty sections in sitemap
> -----------------------------------------------------------------------------
>
> Key: MSITE-651
> URL: https://jira.codehaus.org/browse/MSITE-651
> Project: Maven 2.x and 3.x Site Plugin
> Issue Type: Bug
> Affects Versions: 3.1
> Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
> Reporter: Andreas Sewe
> Attachments: example.tar.gz
>
>
> When using {{generateSitemap}}, the resulting {{sitemap.html}} contains ugly
> empty sections (empty {{<h4>}}, superfluous {{<hr>}}) if one of the _special_
> menus ({{parent}}, {{module}}) is empty as the project in question does not
> have a parent or modules, respectively.
> The {{sitemap.html}} generated by the attached example project ({{mvn site}})
> illustrates this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira