Difference between revisions of "Recycled WikiContent"

From Gramps
Jump to: navigation, search
(Created page with "{{:Gramps_5.1_Wiki_Manual_-_Preface}} __NOEDITSECTION__ R")
 
m
Line 1: Line 1:
{{:Gramps_5.1_Wiki_Manual_-_Preface}}
+
Many instructional documents must repeatedly present subsets of instructions. Synchronizing all the instances of that subset repeated throughout the wiki is a poor use of energy.
  
 +
These subsections can be named as separate templates and then simply included (by name) in the Wiki pages.  The MediaWiki system will look up & embed the expanded subsection into the page.
 +
 +
By editing the template, all the pages using that template will be updated instantly. This is the handled much like  re-using image files on web pages.
 +
 +
However, too many templates create a filing mess.  An alternative to ripping out a potentially re-useable chunk of text occurs when the original document has only a single re-useable subsection. In that case, you can mark off the desirable subsection and use the original page like a template.
 +
 +
The following collapsible subsection is a [https://m.mediawiki.org/wiki/Transclusion Transclusion] (''transcribed inclusion'') from the [[Gramps_5.1_Wiki_Manual_-_Preface|Gramps 5.1 Wiki Manual - Preface]] page. (The <onlyinclude>...</onlyinclude> tags were added the original page around the re-useable subsection.)
 +
 +
{| class="wikitable collapsible collapsed"
 +
|-
 +
! Transclusion example
 +
|-
 +
| {{:Gramps_5.1_Wiki_Manual_-_Preface}}
 +
|}
 +
 +
----
 +
 +
----
 
__NOEDITSECTION__
 
__NOEDITSECTION__
  
 
[[Category:WikiContributors|R]]
 
[[Category:WikiContributors|R]]

Revision as of 18:49, 20 September 2019

Many instructional documents must repeatedly present subsets of instructions. Synchronizing all the instances of that subset repeated throughout the wiki is a poor use of energy.

These subsections can be named as separate templates and then simply included (by name) in the Wiki pages. The MediaWiki system will look up & embed the expanded subsection into the page.

By editing the template, all the pages using that template will be updated instantly. This is the handled much like re-using image files on web pages.

However, too many templates create a filing mess. An alternative to ripping out a potentially re-useable chunk of text occurs when the original document has only a single re-useable subsection. In that case, you can mark off the desirable subsection and use the original page like a template.

The following collapsible subsection is a Transclusion (transcribed inclusion) from the Gramps 5.1 Wiki Manual - Preface page. (The <onlyinclude>...</onlyinclude> tags were added the original page around the re-useable subsection.)