Avoiding newlines between template calls

From Semantic MediaWiki Community Wiki
Jump to: navigation, search

Extension: Semantic Forms

Description:

[edit] Problem

Form-created articles contain one template call per "for template". If you have multiple templates in the form, the template calls in the resulting article are terminated by newline characters.

While this leads to good readability of the code of the resulting article the newlines introduce unintended vertical space in the article.

The problem is especially noteable when you have templates containing only "silent" property settings.

[edit] Solution

Including a <nowiki/> at the very end of the template "hides" the newline from the wiki parser so it does not insert empty paragraphs.

[edit] Example

A "silent" template as mentioned above could look like this:

<includeonly>[[Property::{{{Value|}}}|]]<nowiki/></includeonly>
Personal tools
Namespaces
Variants
Actions
Navigation
Add data
Help
Data export
Tools