Adding Custom Parameters
THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO
You can send custom parameters to templates by adding them to the collection as a whole or to individual topics.
Sending a custom text parameter to the whole collection
To add a custom text parameter to the whole collection, follow these steps:
- Select the Collection tab;
- In the Template parameters grid, enter the parameter's name in the Name column;
- Enter the parameter's value in the Value column;
- Save your collection.
You can now reference this parameter from your custom template.
Collection wide templates parameters are also used as reusable content snippets as if they were part of the Snippets grid on the Publishing tab.
Tópico user guide collection uses a global template parameter for the software version. This parameter is then used as a text snippet on the Download page and the version number in the header is found in the template, with the following markup.
<xsl:if test="$product_version"> <xsl:call-template name="product_version"/> </xsl:if> <!-- product version template --> <xsl:template name="product_version"> <div class="product_version"> <xsl:text>Version </xsl:text> <xsl:value-of select="$product_version"/> </div> </xsl:template>
Sending a custom nodeset parameter to the whole collection
To add a custom text parameter to the whole collection, follow these steps:
- Select the Collection tab);
- In the Template parameters grid, enter the parameter's name in the Name column;
- Enter the parameter's value in the Value column;
- Save your collection.
You can now reference this parameter from your custom template.
Sending a custom text parameter to a single topic
To add a custom text parameter to a single topic, follow these steps:
- Select the Topic tab;
- In the Template parameters grid, enter the parameter's name in the Name column;
- Enter the parameter's value in the Value column;
- Save your collection.
You can now reference this parameter from your custom template.
THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO