Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Document Properties Marker
overridefalse


Short DescriptionDiscard unwanted references in manually compiled lists with the projectdoc Toolbox on Confluence.
Doctypetopichide
NameCompacted Lists
Short Name
Parent
Parent Property
property-nameName
hide
Audience

Name List
doctyperole
render-no-hits-as-blanktrue
render-list-as-comma-separated-valuestrue
namesAuthor, Template Author
propertyAudience


Subject
Name List
doctypesubject
propertySubject

Categories
Name List
doctypecategory
propertyCategories

Tags

Tag List
render-list-as-comma-separated-valuestrue
namesConfluence, projectdoc Toolbox, List, No Noise
propertyTags

hide
Flagshide
Iteration

Iteration
valuefilledproduction

hide
Type

Name List
doctypetopic-type
render-no-hits-as-blanktrue
namesTip
propertyType


Level of Experience

Name List
doctypeexperience-level
render-no-hits-as-blanktrue
namesAdvanced Beginner
propertyLevel of Experience


Expected Duration5 min
Sponsors
Name List
doctypestakeholder
render-no-hits-as-blanktrue
propertySponsors

Sort Keyhide


...

Section
show-titlefalse
titleDescription

The Wiki Link Macro allows to render links in different ways. When manually compiled in a list, the Table Merger Macro allowed to discard list items with certain properties. For instance blank or simple text.

This tip shows how to use tools from the PDAC1 for Confluence to

  1. Set a Link
  2. Set Links manually in Lists
  3. Discard List Items that are empty or have no Links


Section
titleSet a Link

The Wiki Link Macro allows to control the rendering of links. Dependent on the existence of the target document, the link may be rendered differently, for instance empty or as plain text (without a link).

The reason to render a link to empty could be to not render a reference to an document that does not exist. If you choose to render the label as text, readers would see the link anticipate correctly where a link would be rendered as soon as the referenced document comes into existence. Different These are simply different rendering strategies for different use cases.

...

Section
titleSet Links in a List

If you have such a link (using the Wiki Link Macro) in bullet list and choose to render a link to a not-yet existing page as empty, there will be a noisy empty bullet point. You could render the link as plain text, which may provide some guidance to users. It can indicate that a piece of information may exist in the future and that here is will be the location of a link in the future. to this piece of information.

Doctype add-ons use this approach frequently on space homepages.

Image Added

Above you see five bullet points, each has a Wiki Link Macro, but only three of them point to existing documents (Profiles, Tours, and Topics). FAQs (rendered as plain text) and Glossary (the last list item which is rendered as empty) point to documents that do not exist.


Section
titleDiscard empty Lines

To get rid of the empty unwanted lines in a list of items, the Table Merger Macro – despite of its name – is a handy tool. Wrap the list within the body of the macro.

In order to remove the empty line at the end of the list in the example above set the Discard parameter to empty.

Image Added

The result on discarding empty lines is that the last item is removed:

Image Added

Discarding empty lines and lines without links by selecting no-links results in removing the FAQs and the Glossary link:

Image Added


Section
titleFor Template Authors

In case you design templates use the Wiki Link and Table Merge Macro like this:

Code Block
languagexml
<ac:structured-macro ac:name="projectdoc-table-merger-macro">
  <ac:parameter ac:name="discard">no-links</ac:parameter>
  <ac:rich-text-body>
    <ul>
      <li>
        <ac:structured-macro ac:name="projectdoc-link-wiki">
          <ac:parameter ac:name="page">projectdoc.content.profile.home.title</ac:parameter>
        </ac:structured-macro>
      </li>
      <li>
        <ac:structured-macro ac:name="projectdoc-link-wiki">
          <ac:parameter ac:name="page">projectdoc.content.tour.home.title</ac:parameter>
        </ac:structured-macro>
      </li>
      <li>
        <ac:structured-macro ac:name="projectdoc-link-wiki">
          <ac:parameter ac:name="page">projectdoc.content.faq.home.title</ac:parameter>
        </ac:structured-macro>
      </li>
      <li>
        <ac:structured-macro ac:name="projectdoc-link-wiki">
          <ac:parameter ac:name="page">projectdoc.content.topic.home.title</ac:parameter>
        </ac:structured-macro>
      </li>
      <li>
        <ac:structured-macro ac:name="projectdoc-link-wiki">
          <ac:parameter ac:name="empty-handling">empty</ac:parameter>
          <ac:parameter ac:name="page">projectdoc.content.glossary-item.home.title</ac:parameter>
        </ac:structured-macro>
      </li>
    </ul>
  </ac:rich-text-body>
</ac:structured-macro>



Section
titleSummary

This short tip has shown how to manually construct lists with line items to be rendered or not at request time.

The combination of the Wiki Link Macro and the Table Merger Macro supports template authors to manually construct navigation links in lists.


Section
titlePrerequisites

...