Open Xenonym opened 5 years ago
Thanks for bringing up the MediaWiki's transclusion feature @Xenonym
Looks like transclusion and subclusion are smiliar to our include
and boilerplates
, respectively?
As you have mentioned, transaction markup can be achieved using fragment inclusion. Also note that our tags mechanism and include variables too can be used to create slight variations to a component being included.
Some initial thoughts:
includeonly
goes against that principle. But marking a frament as definition
, summary
, optional
etc. is more natural because the name is describing the fragment, not how it is used.includeonly
does not give that kind of flexiblity.What do you guys think?
- Ideally, the component being reused should not know how it is being reused. Marking a fragment
includeonly
goes against that principle. But marking a frament asdefinition
,summary
,optional
etc. is more natural because the name is describing the fragment, not how it is used.- We cannot assume a certain component is always included in the same way. Fragments that are omitted in one reuse context may not be omitted in another. i.e., marking a fragment
includeonly
does not give that kind of flexiblity.
I think the final implementation of the tag mechanism (#652) would allow the authors to implement these scenarios. I also agree that components have no business in controlling the inclusion directly (the tags themselves provide a better way to control that, and also provides a better context on why certain things are being included/excluded).
I can't find a good use case for these tags. :/
Tell us about your environment
Rationale: MediaWiki has a transclusion feature, which is similar to our
<include>
tag. It also supports transclusion markup to allow control over how contents are included:Since page inclusion is one of MarkBind's main features, I am wondering if these additional methods for controlling inclusion might be of value? @damithc
Note that these features to a certain extent can be emulated by page fragments, but these tags do not require the creation of fragments for use.