Issue Details (XML | Word | Printable)

Key: TOC-42
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: David Peterson
Votes: 3
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Confluence Table of Contents Macro

TOC's rendered inside a report will not link to the original page

Created: 15/Nov/07 11:47 PM   Updated: 25/Aug/08 12:07 AM
Component/s: None
Affects Version/s: 2.4.1
Fix Version/s: 2.4.9

Time Tracking:
Not Specified

Labels:


 Description  « Hide
Since TOC generates links only as the '#anchor', if the toc is generated with the Reporting plugin for a different page, the link will not work, since it's expecting to be rendered on the existing page.

The best solution is to add an 'absoluteUrl' parameter (off by default) which can be set to true if the TOC should render the full URL of the page. It should be off by default because it's quite common to actually include the page content on the current page - eg, using the {include} macro, and having the URL as part of the link by default will have the TOC jump to the original page, not the named section on the current page.



 All   Comments   Work Log   Change History   FishEye   Crucible   Builds      Sort Order: Ascending order - Click to sort in descending order
Patricia Kale added a comment - 03/Jun/08 07:29 PM
Hi David,

I am trying to use this feature but I am confused about how to enable the absolute URL parameter. I am also confused about which toc macro/plugin to use, too, since there is the TOC macro from Confluence and the toc macro in the Table of Contents plugin (CustomWare). If you could explain which macro/plugin to use, how to ensure that the "right" one is reference (if both are installed in the repository), and how to enable the absolute URL parameter (not documented anywhere except here), I would be most grateful. An example would be terrific (e.g. {toc:anchor=true|absoluteUrl=true} - not working for me).

Thanks,
Pat


Patricia Kale added a comment - 04/Jun/08 07:52 PM
Hi David,

I just re-read your Jira issue and now see that I read it in a hurry and misunderstood your intent. As I understand it now, you have suggested that a new argument be added to TOC to force it to render the full URL of the page. I initially thought that you were referring to an undocumented argument.

Thanks,
Pat


Jay Lance added a comment - 13/Jun/08 01:52 PM
I've seen a few examples of how to include a toc from Page A onto Page B, but no way to make the links work properly.

Method 1:
PageA:

{metadata:toc}{toc}{metadata}

PageB:

{metadata-from:PageA|toc}

Method 2:
PageA:

{toc}
PageB:
{report-table}
{local-reporter:content:children|source=PageA}
{report-column:title=PageA Contents|link=False}{toc}{report-column} {report-table}

Either way, the links are anchors to the current page, not the page the link should go to.


Vijay Iyer added a comment - 23/Jun/08 09:58 AM
I'll add another nice way to use {toc} if David's brilliant suggestion is heeded: I would place a {toc} over in the child page, and include it in within {excerpt} macro. Then I would display the same table-of-contents in the parent page via the {excerpt-include} macro.