Question

In mediawiki, whenever you embed a template into an article, it is always proceeded by a line break (as far as I know). Is there some way to prevent this so that I may place templates next to one another without the second one being on a new line?

Was it helpful?

Solution

Use the <includeonly> tag if you didn't already, and make sure not to put any returns in your template before the </includeonly>

So

<includeonly>This is a template. </includeonly>

makes {{Template}}{{Template}} output as

This is a template. This is a template


But,

<includeonly>This is a template. 

</includeonly>

makes {{Template}}{{Template}} output as

This is a template. 

This is a template

Even single returns are dangerous. If template A contains:

<includeonly>{{B}}
</includeonly>

and template B contains:

<includeonly>Text
</includeonly>

then when you insert {{A}} into your page, both returns are subsequent and give paragraph break.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top