Skip to main content

 

MindTouch Success Center

Display titles of reused sections

This page applies to:MindTouch (current)

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:

wiki.page("/Page_Path", "Section Title", true, 1)

 

How to display section headings for reused content


  1. Add "Section Title" to the reuse call:

  1. Verify the reused section displays the section heading:

reusable sections.png
 

Using additional parameters


When using additional parameters, add them in the order listed below: 

wiki.page(path, section, revision, show, heading, nilIfMissing);

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 wiki.page 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.

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)

 

 

  • Was this article helpful?