You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

projectdoc Toolbox

Discard unwanted references in manually compiled lists with the projectdoc Toolbox on Confluence.

Audience
Type
Level of Experience
Expected Duration
5 min

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 projectdoc Toolbox for Confluence to

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

Set Links in a List

If you have such a link 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 here is the location of a link in the future. Doctype add-ons use this approach frequently on space homepages.

Discard Lines

To get rid of unwanted lines in a list of items, the Table Merger Macro is a handy tool.

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

The result on discarding empty lines is this:

Discarding empty lines and lines without links by selecting no-links results in this:

For Template Authors

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

<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>

Summary

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

Resources

Display Table Macro
Lists references to projectdoc documents in a table. Allows to select document properties for columns. Also non-list representations are provided.
Table Merger Macro
Merges tables (and lists) into one table (or list).
Merging Tables and Lists
References listed in tables and lists may come from different sources. The Table Merger Macro allows to render a number of tables (or lists) as one table (or list).

  • No labels