Difference between revisions of "Transclusionism"

From Mondothèque

Line 4: Line 4:
 
To create links between different pages, based on some selection of text that somehow connects the pages on the bases of some common ground:
 
To create links between different pages, based on some selection of text that somehow connects the pages on the bases of some common ground:
 
* Think of a category that is the common ground for the link. (eg. '<code>rawdata</code>'), formulate it '''without spaces''' or using underscores (eg. '<code>raw_data</code>', not '<code>raw data</code>' );
 
* Think of a category that is the common ground for the link. (eg. '<code>rawdata</code>'), formulate it '''without spaces''' or using underscores (eg. '<code>raw_data</code>', not '<code>raw data</code>' );
* Edit the page and add <code><nowiki>{{RT|rawdata}}<selection begin=rawdata> </nowiki></code> before the text selection, and  <code><nowiki><selection end=rawdata></nowiki></code> at the end;
+
* Edit the page and add <code><nowiki>{{RT|rawdata}}<selection begin=rawdata /> </nowiki></code> before the text selection, and  <code><nowiki><selection end=rawdata /></nowiki></code> at the end (take care of the '<code>/</code>' at the end, without it doesn't work);
 
* All the other text selections in other pages which are selected along the same common ground will be transcluded on the side of the text.
 
* All the other text selections in other pages which are selected along the same common ground will be transcluded on the side of the text.
  

Revision as of 10:00, 27 February 2016

This page documents some of the contraptions at work in this wiki.


To create links between different pages, based on some selection of text that somehow connects the pages on the bases of some common ground:

  • Think of a category that is the common ground for the link. (eg. 'rawdata'), formulate it without spaces or using underscores (eg. 'raw_data', not 'raw data' );
  • Edit the page and add {{RT|rawdata}}<selection begin=rawdata /> before the text selection, and <selection end=rawdata /> at the end (take care of the '/' at the end, without it doesn't work);
  • All the other text selections in other pages which are selected along the same common ground will be transcluded on the side of the text.


Currently on top of MediaWiki and SemanticMediaWiki, the following extensions needed to be installed for the contraptions to work:

  • Labeled Section Transclusion to be able to select specific sections of the texts and make connections between them;
  • Parser Functions to be able to operate statements like if in the wiki pseudo-language;
  • Arrays to create lists of objects, for example as a result of semantic queries;
  • Loops to loop between the arrays above;
  • Variables as it's needed by some of the above.

What links here