Index Entries Table Macro

Renders a table of index entries.

Audience
Categories
Display / Query
Tags
Type
Since
1.10
Page Size Support
(tick)

Render indices sorted by document names. The names of documents are specified as a comma-separated list in the body of the macro.

Unlike the Index Card Macro the Index Entries Table Macro renders the documents of the hit list as lines in a table or items in a list.

Properties

Doctypes

Specify the type of the documents to select. If documents from more than one document type are to be selected, enumerate them in a comma-separated list. Leave blank to select documents from any doctypes.

If a property selected from a document is not supported by a doctype, a blank cell will be rendered.

Defaults to select Glossary Items.

Select

Specify a comma-separated list of document properties or section names to display.

If not specified, the name and short description of the document is displayed per default.

The property name may be the name of a section of the document to be transcluded.

Count Columns

The last character may also be a '#' in which case the property value is applied to the Count FunctionThe Count Function counts the number of table rows, number of list items, or number of definition terms (whichever of these three is encountered first). Otherwise the count function returns zero. This allows to render the count of a result set rendered in a section.

The Count Macro also provides this function to the contents of its body.

Alignment

Column alignment can be controlled by using '<' for left, '|' for center, and '>' for right alignment. Add this character at the end of the name (even after the '+' or '#' indicator).

Templates

Use Templates to render complex values in a column cell. The syntax to specify a template is

#COLUMN_NAME{TEMPLATE_SPECIFICATION}

The column name is the label to use for the column heading. It may be replaced using Header Translations.

The template specification uses placeholders to reference properties.

To render a link for a property in a template, the curly braces (${...}) need to be replaced by square braces ($[...]) when referencing a document property.

The example renders a link with the value of the Short Description property.

Where

A Lucene search expression to filter on the results. If the property contains spaces, remove them or use $[...].

Examples:

  • Name = "foo" AND ShortDescription NOT \"bar\"
  • Name = "foo" AND $[Short Description] NOT \"bar\"

Please refer to Search Tips for information on limitations and extensions on the search expression syntax provided by projectdoc.

Header Translations

Comma-separated list of key value pairs. Key is the header to be replaced by the value. Format: k1=v1, k2=v2.

Use this parameter if the name of the property is not appropriate as the column header.

The default label '#' may be overridden locally like this:

#=Counter

The label of all number column headings is also controlled by a space property named Counter Column Header.

Counter Column

If checked adds a counter as the first column.

Space Key

To limit the search on documents to the space with the given key.

The editor allows to scan for space names. If you want to select more than one space, use the space keys text field (in addition to this field).

Space Keys

To limit the search on documents to the spaces with the given keys. Use this if you want to search in several spaces.

Leave blank, if you want to search in the current space only. Use "@all" to search in all spaces.

Space key may reference space categories introduced by the hashmark (e.g. #myproject).

Refer to Search Space for more information on selecting spaces by their Confluence Space Category (specified via the space admin page).

Render Mode

Controls how the table should render properties of the document result set.

There are three render modes: table, list, and section.

Table Render Mode

If you want to render the result in a table, leave this parameter value blank.

You may also explicitly set this value to table.

Add a CSS class by separating it with a "=".

Setting the widths of the columns is supported. Added a columns descriptor in brackets after the CSS class name. The comma-separated list of width is passed as CSS style values for the width attribute.

Since version 4.11 the columns must provide a value for the counter column (if selected).

These CSS classes are provided by the projectdoc Toolbox to style your tables:

Name Short Description
Use the CSS class projectdoc-alternating for a HTML table to get alternating colored table rows.
Marks column cells that contain a row counter.
Use the CSS class projectdoc-fullwidth for a HTML table to get a table using 100% of the available width.
Use the CSS class projectdoc-halfwidth for a HTML table to get a table using 50% of the available width.
Use the CSS classprojectdoc-quarterwidth for a HTML table to get a table using 25% of the available width.
Rendered with a properties table in front of transcluded content.
Use the CSS class projectdoc-thirdwidth for a HTML table to get a table using 33% of the available width.

List Render Mode

You may render a two column result in a list. Usually this is the case for the document name and short description.

The following values are valid:

  • definition - for a definition list
  • numbered - for a numbered list
  • unnumbered - for an unnumbered list
  • plain - for a comma separated list as text

You may add a CSS class by separating it with a "=".

If you add a "-" at the end, the first character of the second column value (e.g. the short description) will be lower cased.

Here are a few examples with valid values:

ValueDescription
definitionRenders as a definition list.
unnumbered-Renders as an unnumbered list. The first character of the second column value is lower-cased.
definition=simpleindent-Renders a definition list with class simpleindent. The first character of the second column value is lower-cased.

Section Render Mode

To render the result with vertical tables in sections, the parameter value has to be an asterisk ('*') or an integer between 0 to 6, optionally be followed by a "+".

Otherwise there is a separate table for each document, where the first column contains the name of the property, the second its value. If the digit is zero, there will be no heading generated in front of the table. The first property in the select clause provides the value for this heading.

If a "+" sign is added (e.g. "2+"), the first property will be rendered in the heading and in the first row of the table. You may use this option to render the name as the heading and as a link in the first row of the table.

Since version 1.17 the properties table may be rendered as definition list (append an 'l'). Also the widths of the table may be controlled. For both representations a CSS class may be applied.

Styles for definition lists provided by the projectdoc Toolbox are documented in Definition List Macro.

Since version 4.5 the short description can be extracted to be rendered in front of the table by placing the character 's' after the level (e.g. "*s").

Separator

The default separator for the index items specified in the body of this macro is the comma (','). The items may be specified on multiple lines, but each line is split by the commas in this line.

If your index entries have commas in their names, the separator may defined to something different than a comma. If you have one entry on each line, specify '\n' as a special separator. Note that a separator can only have one character. The special separator for newlines is an exception.

Insert Short Name Entries

If a value different to none is selected, an additional entry is added for each entry that has a short name or an abbreviation.

ValueDescription
noneNo additional values are added.
short-nameAdditional entry for the Short Name is added.
abbreviationAdditional entry for the Abbreviation is added.
allAdditional entry for Short Name and Abbreviation is added.

Additional entries render a link with a reference to the main entry (identified by the document name).

Render Index

Render sections for index keys.

The elements associated with an index key are enclosed in an element and the index key is rendered.

CSS ClassDescription
div.projectdoc-indexThe block around the table of index entries.
span.projectdoc-indexThe text rendering the index key.

The default styles are:

div.projectdoc-index {
  margin-top: 2em;
}

span.projectdoc-index {
  font-size: larger;
  font-weight: bold;
}

Render Index Access Panel

Render links to index keys above the index for quick access of the index key from the top of the page.

The value of this parameter is only taken into account, when Render Index is selected.

The default styles are:

div.projectdoc-index-access-panel {
    border-radius: 10px;
    border: 2px solid #036;
}

.projectdoc-index-access-panel ul {
    margin: 3px;
    padding: 3px;
    list-style-type: none;
    text-align: center;
}

.projectdoc-index-access-panel ul li {
    display: inline;
}

.projectdoc-index-access-panel ul li a {
    border-radius: 10px;
    text-decoration: none;
    padding: .2em 1em;
    color: white;
    font-weight: bold;
    background-color: #369;
}

.projectdoc-index-access-panel ul li a:visited {
    color: white;
    background-color: #369;
}

.projectdoc-index-access-panel ul li a:link {
    color: white;
    background-color: #369;
}

.projectdoc-index-access-panel ul li a:hover {
    color: white;
    background-color: #036;
}

Caption

The label for the table caption.

No Table Heading

If checked no heading will be rendered.

Since version 1.17 this parameter also applies for the table above the sections in Section Render Mode.

Restrict to immediate Children

If checked, only immediate children of the current document are valid as hits.

Restrict to Favored

If checked, only documents marked with a star are valid hits.

This feature allows to filter documents in the result set that are not marked as favored.

Pages that are marked with are star a currently defined as "Saved for Later" and where previously deemed as favorite (or favourite).

Render no hits as blank

If the query found no hits, the result is rendered as a short text message. If a result with no hits should not be rendered at all, check this box.

No Hits Text

Text to be rendered if no hits are shown.

This allows to customize the text message.

Identifier

Unique identifier for the rendered content.

This identifier is used for Remote Control and Context Controlled Macros.

Identifier Classes

Apply identifier classes to render this macro as part of a group.

This identifier is used for Remote Control and Context Controlled Macros. Multiple macros on a page may have only one unique Identifier, but may share common identifier classes.

Context controlled

When checked configures parameters via document and space properties.

For more information please refer to Context Controlled Macros.

Remote Controls

List of controls to pass to transcluded contexts. Controls are separated by ampersand ('&').

This allows to control the rendering of remote controllable macros by sending controls. For more information please refer to Remote Control.

Details

Remote Controlled Documents

Remote Controlled Documents allow to control the content at request time. A HTTP request may override parameters of the macro. A request parameter addresses a macro by its identifier. After the identifier the name of the parameter is appended, separated by a colon.

The list of parameters allowed to override:

  • doctype
  • select
  • where
  • header-translations
  • render-counter-column
  • space-key
  • space-keys
  • separator
  • insert-short-names
  • render-index
  • render-index-access-panel
  • table-caption
  • suppress-table-heading
  • restrict-to-immediate-children
  • render-no-hits-as-blank
  • render-no-hits-as-blank-text

Debugging

If a term specified in the body of the macro does not exist, the term is simply dropped. This makes it difficult for long lists to identify missing term definitions.

If the space property Debug Mode is set to true, an error box is rendered that lists all undefined terms.

Related macros

Display List Macro
Lists references to projectdoc documents in a list. List contain names and optional short descriptions.
Display List Template Macro
Lists references to projectdoc documents in a list. List items are defined by templates referencing properties.
Display Table Macro
Lists references to projectdoc documents in a table. Allows to select document properties for columns. Also non-list representations are provided.
Index Card Macro
Renders transcluded content fetched from documents of a result set.
Tour-by-Property Macro
Renders a predefined list of documents in a table . Documents are selected by a document property. Allows to select document properties for columns. Also non-list representations are provided.
Transclude Documents Macro
Renders transcluded content fetched from documents of a result set.

References

Limitations on Query Results
The number of hits for document queries is limited due to performance reasons.

Resources

More information on using the Display Table Macro.

Employ the Autolist Feature with Categories
Categories, tags, and others allow to organize the pages in your wiki. First define categories pages with display table macros. Second tag your pages with these categories. With this two-step process it is easy to have multiple views to link to your information in your wiki.
From a Table to Views
Short introduction on using data tables or using views on data.
Control Column Width with Display Table Macro
The Display Table Macro provides a quick fix feature to control the width of the table columns.
Compact Columns
Tables often require a lot of space to be rendered. This tip shows how to reduce the demand of space.
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).
Use Display Table for Transclusion References
It is easy to list all pages that transclude a section from the current page. This allows you, as an author, to check quickly if changes to a document that is transcluded, needs changes to the transcluding documents.
The hidden Section
The Content Marker Macro identifies content that can be displayed using the Display Table Macro. This is a short tip on how to transclude content from a projectdoc document.