Versions Compared

Key

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

...

Document Properties Marker
overridefalse


Short DescriptionMerges tables (and lists) into one table (or list).
Doctypemacrohide
NameTable Merger Macro
Parent
Parent Property
property-nameName

Audience

Name List
doctyperole
render-no-hits-as-blanktrue
namesAuthor
propertyAudience


Type
Name List
doctypemacro-type
render-no-hits-as-blanktrue
propertyType

Subject
Name List
doctypesubject
propertySubject

Categories

Name List
doctypecategory
namesVisual
propertyCategories


Tags
Tag List
propertyTags

Flags
page-size-limit-detection
hide
Iteration

Iteration
valueproduction

hide
Since2.1
Deprecatedhide
Removedhide
Sort Keyhide


...

Section
indextrue
show-titlefalse
titleDescription

The macro allows to merge tables from different sources into one table.

Example sources may be the Transclusion Macro transcluding a table or the Display Table Macro.

Note Box

The current version of the macro only processes tables where the heading is found in the first table row (either inside an HTML thead element or not).

The Table Merger Macro does only merge rows of two tables and allows a row mapping. In case cells of two tables should be merged into one row, use the 

Static Document Link
documentTable Set Macro
. For details on this use case, refer to
projectdoc-static-document-link-macro
anchorMerging Table Columns into Rows
documentTable Set Macro
labelMerging Table Columns into Rows


projectdoc-section
titleProperties


Section
titleColumn Names

List of column names to render.

If blank the columns from the tables are used.


Section
titleDiscard

Allows to discard list items or rows.

emptyDiscard empty list items or table rows without cell content.
no-linksDiscard list items or table rows if there is not at least one link.
no-itemsDiscard list items or table rows if link has class projectdoc-no-docs
fullDiscard list items or table rows if fully set (all cells have content).
partialDiscard table rows if there is at least one empty cell.  
is-checkedDiscard list items or table rows if a task list with at least one checked checkbox is found.
is-not-checkedDiscard list items or table rows if a task list with at least one checkbox is found that is not checked.
strikethroughDiscard list items or table rows if at least some text is tagged with strikethrough.


Content Marker
iddiscard-use-cases

The values empty, no-links, no-items, and no-links + no-items are typically used for definition, numbered, and bullet lists.

The values empty, full, and partial are typically used for tables. The value partial only has meaning for tables.

The value can be controlled by the space property

Static Document Link
documentTable Merger Macro Param Discard
. The space property 
Static Document Link
documentTable Merger override empty Items
 overrides the macro configuration.

Example Box
titleFilter Examples with Discard

For examples please refer to the tip Filter on Table Rows.


projectdoc-box-version
since2.5

The parameter is available since version 2.5.

projectdoc-content-marker
iddiscard-since-4-5


Version Box
titleNew Values
since4.5

The values full and partial are supported since version 4.5.

The values is-checked and is-not-checked are supported since version 4.6.



Version Box
since5.0

The value strikethrough is available since version 5.0.4.



Section
titleHeader Translations

Comma-separated list of key list-value pairs to map columns from tables. This allows to rename columns to match.

Format: k1=v1|v2, k2=v3.

In case the column header should be renamed, simply specify the new column name with the Column Names parameter and map the columns of the merged tables here.

projectdoc-box-example

If the column on both tables to be merged is "A" but it should be named "X" and the second column "Short Description" should be not renamed, then:

  1. Column Names: X, Short Description
  2. Header Translations: X=A

In case the column to be named "X" is merged from columns named "A" and "B" then:

  1. Column Names: X, Short Description
  2. Header Translations: X=A|B



Section
titleSort By

Specify the column names for a sort order. The suffix "-" will invert the sort order (descending).

Example Box
titleTable Sort Orders
  • Name-
  • Bonus Points, Name

Any string will turn on sort on list items.

Version Box
until6.0.3

Up to version 6.0.3 the sort column for tables is limited to one column and the order is always ascending.

Note that sorting is executed on table rows. If the rows reference documents, the properties used for sorting must be rendered in the tables.


projectdoc-section
titleCSS Class

Set to the table or definition list.


...

Section
titleMacro Body

Tables or lists (dl, ul, ol) found in the body of the macro are merged.

Only tables or lists of the same kind are merged. If a collection of one kind is found, collection of other types are not merged. For instance you cannot merge tables with definition lists. If at least one table is found, lists of any kind are not merged.


Section
titleDetails

Some details on using this macro.

Section
titleNested Lists

Since lists may be nested, it is important to only use list roots when merging lists. Therefore lists are required to be siblings to be merged successfully. If lists are nested within other containers, the root containers can be marked with 

Display Property
add-linktrue
documentprojectdoc-table-merger-root
property-nameIdentifier
 to select the contained list.

This is especially useful when the 

Static Document Link
documentContent Marker Macro
 is used to make parts of lists only available for users with specified permissions or being members of specified groups.

Version Box
since4.9

This feature is available since version 4.9.



Section
titleMerging Text Lists

Text lists rendered with the 

Static Document Link
documentDisplay Document Property As List Macro
 may be merged by this macro.

Version Box
since4.11

This feature is available since version 4.11 of the projectdoc Toolbox.



Section
titlePage Size Warnings

This macro supports macros that render a table. If such a macro runs into the limits set by the page size configuration and renders a warning, then this macro will render an error.



Section
indextrue
titleRelated Macros


Tour
render-as-definition-listtrue
replace-title-with-nametrue


TitleShort Description
Table Set Macro
Display Table Macro



...