Loading...
 
Skip to main content

Features / Usability


Transclusion - parameters must fill one entire line?

Hi everybody, I just played with the {TRANSCLUDE} plugin as described on http://doc.tiki.org/PluginTranscludeQuestion.

Unfortunately it seems to me that the smallest possible unit which may be transcluded is one entire line. Below I include two screenshots which demonstrate it.

This first shows the source page with one simple word text written in bold. When this is transcluded than the word remains inline with the rest. The screenshot shows only the crop of the preview page originating on the same page however the same happens when that source page is transcluded within the target page. It works as expected:

Image

However, once I make the word text the parameter field, this word becomes surrounded by two invisible Carriage Returns. This is not how I would expect that it should work. Only the field parameter should be substituted by the parameter text provided from the target page and no wiki syntax and/or logics should be neither added nor subtracted. Just a clean substition. Again I just show the crop of preview page but it is the same behaviour as when transcluded within the target page.

Image

Eg. imagine, that the target page would contain something like this:
Copy to clipboard
{TRANSCLUDE(page="sourcePageName")}text{TRANSCLUDE}


In fact what you expect is to receive the result shown on the first image, but I get the result from the 2nd image. Of course it is not useful to substitute text for text word but I demonstrate the addition of two carriage returns here.

Why I ask. I am accustomed to MediaWiki. In MediaWiki the:

  1. transclusion function
  2. template namespace
  3. ParserFunctions extensionQuestion


is what makes 90% of features of MediaWiki and of wikipedia.org now!

It allows you to build the page blocks (ie. templates) which are built using the basic MediaWiki syntax and than repeat to use these blocks in another pages, either again in templates of higher abstraction level or in any final main space wiki page.

These 3 features allow to use MediaWiki as the plasticine. The user may create it owns block of different codes while he does not need to know anything about CSS and HTML. I understand that the efficient implementation requires the intelligent caching because you parse more levels of wiki pages, however it really is worth it. It is the difference between having an user interface with the dialog boxes and the user interface containing the nearly complete programming language.

Of course one would be strongly limited to use transclusions efficiently when the smallest substitution amount is one entire line.

Thus the question is whether I am wrong is something or whether this plugin works as expected or whether there is a bug somewhere. Of course Tiki may have different paradigm or way how to solve the issues like these which I am not aware of yet.

Interesting observations Huck. I don't have much experience with TRANSCLUDE, but I've been trying to learn more about it after seeing it implimented on http://www.ogre3d.org/tikiwiki/Question. Maybe you could find some answers by looking at how the plugin works on this site?