Issue Details (XML | Word | Printable)

Key: VISIB-15
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Heiko Burghardt
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Confluence Extension: Visibility Plugin

Hiding parts if article is read in {include}-environment

Created: 31/Jul/06 04:59 PM   Updated: 09/Dec/08 06:48 PM
Component/s: {hide-if}, {show-if}
Affects Version/s: 1.4.4
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Confluence 2.2.6a standalone


 Description  « Hide
David asked me to open an issue in the "Visibility Plugin" project area for my request to proof the realizibility on his next pass of the code... His main question is: "Is it possible for a macro to detect that it is in a page which is being included from another page."

These are the whole details of my request:
==================================

Our online software documentation contains single program manuals as
well as module descriptions. The program manuals (one or many) are
included into the module descriptions with the {include}-tag to have
only a single article to change when needed.

Our main problem is that we like to use the {toc} macro in both kind of
documentation - program and module (with includePages option). As a
module description includes the program manuals the result is having a
main toc of the module and all tocs of the program manuals when viewing
a module. Finally, this makes the module description more complex and
has no advantages.

Is it possible to have an option in one of the plugins to remove the
tocs from the view in includes?

We are having two ideas about that but cannot decide if they are realizable:

1. the toc-macro has an option (e.g.) "hidefromincludes=true" and it is
only shown when the Confluence article is accessed directly. Within the
module view they are not shown then.

2. the hide-if macro has an option "type=include" and we add it around
the toc-macro to get the same effect.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
James Mortimer added a comment - 20/Mar/07 06:23 PM
another way to achieve this would be to request to have the include macro parameterized so that you specifically include a portion of the page, or to use the metadata-plugin or zones plugin to pull back only a specific section of the page. so there are several (less elegant) ways to achieve this currently.

Christian Nesemann added a comment - 09/Dec/08 01:41 PM
Hiding details if a page is included would help us a lot, too.

It would also be important that a "type=include" would also detect secure-included pages, as now there's no other way to hide content if you use the "secure-include" -macro. (Cause it uses the rights of the person who created the secure-include macro)

I think a {hide-if:type=included} would be the best option!


James Mortimer added a comment - 09/Dec/08 06:48 PM
1) see also this user macro: http://confluence.atlassian.com/display/CONFEXT/no-include+User+Macro

2) in addition to Christian's comment, there are several ways to 'include' content from another page. There is a user macro called 'edit-include', and there is a plugin called "zones plugin" which both can be used to simply include one page in another. Metadata-from and checklist-attribute also perform a similiar function. Would it be possible for type=include to detect edit-include, zone-template-instance, metadata-from, and checklist-attribute calls aswell? Or will it always be the responsibility of the 'include' macro to do so. Perhaps what we need is a better, well rounded single 'include' macro, as part of the visibility plugin, which incorporates the best features from 'edit-include', 'snippet','zone-template-instance','metadata-from','secure-include','include'. This 'include' macro could override the built in one, and respect the {no-include} or {hide:type=include} or {hide:mode=include} tags.

3) Try this paradigm:

Page One, Two, Three like this

{toc}
h3. Intro
{metadata:Intro}
{metadata}
h3. Details
{metadata:Details}
...details...
{metadata}

Summary Page like this

{toc}
h3. Children Pages
{metadata-report:Title,Intro,Details|root=@self|pages=@children}

or Summary Page like this

{toc}
h3. Children Pages
{checklist:Title|depth=1}
    {checklist-wiki:Page}
      h5. Intro
      {metadata-from:Intro}
      h5. Details
      {metadata-from:Details}
{checklist-wiki}
{checklist}

or Summary Page using the more eleborate "Reporting Plugin" to have fine control over display.