[Bf-docboard] Problem with "Literal" template
mindrones
mindrones at yahoo.it
Sun Aug 30 14:22:22 CEST 2009
Hi
--- On Sat, 8/29/09, Bastien Montagne wrote:
> Hi,
>
> mindrones, I had to remove the "{{documentation}}" template
> from the
> "{{Literal}}" one, it created (it seems) a line return and
> a space in
> wiki code, leading to put the text following the template
> in a "code
> snipet" form. Definitively ugly!
I'm sorry for that, I think I've fixed it now, I've forgot a return in the template.
If this can help others, to fix those problems, "wrap" the return with
a html comment, so you get no return but readability too.
Wrong code:
<span class="literal">{{{1}}}</span>
<noinclude>{{Documentation}}</noinclude>
Fix:
<span class="literal">{{{1}}}</span><!--
--><noinclude>{{Documentation}}</noinclude>
This trick is used a lot in wikipedia templates, see for example wikitext here:
http://en.wikipedia.org/w/index.php?title=Template:Navbox&action=edit
---
I'm documenting and clearing templates, in order to have a well documented
set of templates we can use. See the "upcoming"
http://wiki.blender.org/index.php/Meta:2.5/Guides/Templates :)
To explain a bit, I'm using the same mechanism Wikipedia is
using nowadays: for a given template, say Template:Foo they put
documentation text in Template:Foo/doc and then they transclude
Template:Foo/doc in Template:Foo, so things stay separate and you can
reuse Template:Foo/doc in other pages, see wikitext here
http://wiki.blender.org/index.php?title=Meta:2.5/Guides/Templates&action=edit
Sorry for any inconvenient I might give in these days, I'm working a bit to clear as much as possible before we start documenting 2.5 :)
Best regards,
Luca
_____________
http://www.mindrones.com
More information about the Bf-docboard
mailing list