Mailinglist Archive: opensuse-wiki (174 mails)

< Previous Next >
Re: [opensuse-wiki] Style Guide / Standard Templates
  • From: Christian Boltz <opensuse@xxxxxxxxx>
  • Date: Wed, 30 Dec 2009 18:15:09 +0100
  • Message-id: <200912301815.10394@xxxxxxxxxxxxxxx>

on Dienstag, 29. Dezember 2009, Rajko M. wrote:
On Monday 28 December 2009 07:51:39 Mike Gentry wrote:
Finally, should we maybe compile a list of boilerplate templates,
and eventually one of the wiki team can put them somewhere
appropriate near here ?

The table that is used on is replaced with
plain list on . You can

The page doesn't exist on wiki.o.o ;-)
I guess you are talking about

see is that better suited for easy editable list.

For example, I'm using;

{{Warning|Editing partitions can cause permanent data loss, and
should only be attempted once all important data on the entire
physical disk is backed up to another physical disk}}

That would require a family of warning templates.

I vote for that kind of editor/writer aid.
Although after some time there will be more, and eventually we will
have a new problem, how to find appropriate one. Current table is
not suitable for that, but something like plain list:

{{Warn_partitioning}} > Editing partitions can cause permanent data
loss ... ((Warn_static}} > Static electricity can damage
electronic components ((Warn_root}} > Running program as
root can have serious consequences etc.

or replacement for all specific warnings:

{{Warn_read|Partitioning}} which will print out:
*WARNING* : To avoid problems, please read article [[Partitioning]].

Advantage of plain all capital warning right from the start of line
is that it is lesser intrusive for reading, and in my humble
opinion, those that will ignore bold *WARNING* will ignore any
warning :)

I think we could have the best of both options thanks to ParserFunctions
#switch ;-)

If I get the syntax right, something like this should work: (untested!)

{{#switch: {{{1}}}
| Partitioning = Editing partitions can cause data loss!
| Root = Root can do everything. He can also break everything!
| ...
| #default = {{{1}}}

Note: german wikipedia docs say "| #default = value", says
just "| value" - if in doubt, test both.

This should give us a template that works with some predifined text as
well as with custom warning messages.

It also means that the template becomes quite complex and should have
some documentation included. In this case, it would be a list of
supported labels.
This would also solve the issue how to find the "right" warning text
because they would all be in the documentation of Template:Warning.

The template documentation can either wrapped in <noinclude> or be on a
separate /doc page. See! for an
example with a separate /doc page.
I recently implemented the /doc page way for a customer. The big
difference is that he wants to use a WYSIWYG editor, therefore splitting
off the template doc (and telling him not to edit the template itsself,
at least not with the graphical editor) was the best option in this
case. Since openSUSE uses plain wikitext, just using <noinclude> might
be the easier solution for now.


Christian Boltz
[/v/l/messages] mingetty[1678]: tty1: invalid character for login name
Du hast einen Stubentiger ?
Unsere Katze tat sich auch immer schwer mit dem Einloggen:-)
[Thomas Moritz in suse-linux]
To unsubscribe, e-mail: opensuse-wiki+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-wiki+help@xxxxxxxxxxxx

< Previous Next >