Skip to main content

Display titles of reused sections

This page applies to:MindTouch Responsive

You decided to reuse sections of your content on various pages throughout your site, but then notice that MindTouch does not reuse the section titles of your source content. No problem. The additional revision, show, and heading parameters (NULL,true,1) allow you to display the section titles:"/Page_Path", "Section Title", true, 1)

This call:

Will result in:

reusable sections.png

When using additional parameters, you'll need to add them in the order listed below:, section, revision, show, heading, nilIfMissing);

Note to user  NOTE:  The show parameter requires a value to be set in the heading parameter. If you're looking to display the title of the section in your invocation, set a heading parameter (e.g.1) and set the show parameter to true. If you do not wish to use a specific parameter (e.g. if you do not care about the revision), then you must put a NULL value in its place.

Review the table below for all available parameters:

Name Type Description
path str wiki page path
section str (optional) section to include on wiki page (default: full page)
revision num (optional) page revision to use: 0 is the head revision, > 0 stands for a specific revision (e.g. 1 is the first revision), < 0 is revision relative to head revision (e.g. -1 is the previous revision) (default: head revision)
show bool (optional) show page/section title of included page (default: false) *requires heading parameter below to be explicitly set
heading num (optional) set page/section title heading and adjust all sub-headings accordingly; the adjustment is applied even when the page/section heading is not shown (range: 0-5, where 0 is 'Title' style, 1 is 'Heading 1', and so forth; default: keep original headings)
nilIfMissing bool (optional) return nil if page/section is not found (default: return link to missing page/section)


What's next

Reusing content is a possibility due to DekiScript. If you would like to learn about other properties when reusing content, check out all of the properties in our scripting section. We recommend you only use properties if you are familiar with using DekiScript.