Hi Bryan,
this is precisely the missing documentation I was trying to find, thank you so much! I was on the right track (editing the template page manually) but didn't know how to pass the use input.
This should be part of the official docs I reckon.
Thanks again, you made my day :)
Cheers, frank
On 29/01/19 6:45 AM, Bryan Hilderbrand wrote:
Hi Frank,
You could start with an easier version. For example, do the following:
- In you wiki, search for *Template:Note*
- Presumably that template doesn't exist, so create it and add the
following, then save:
<span style="border:1px; border-style:solid; border-radius: 7px; border-color:#ddffdd; background-color:#f2fff2; padding:0.1em; margin:0.1em; display: inline-block;">[[File:Bulbgraph.png|18px|Note|link=]] '''Note:''' {{{1|}}}</span><noinclude> == Usage == Lightbulb Note: <pre><nowiki> {{Note|Your note text}} </nowiki></pre> </noinclude>
- The only new thing you'll need is the image, you can download it
here https://www.mediawiki.org/wiki/File:Bulbgraph.png and as long as you upload it to your wiki with the same name, it should work fine. 4) Try your new template out by inserting it on a new page with *{{Note|This is Frank's template test.}}*
Notes:
- Remember, the template namespace is special so the call above
(/{{Note|This is Frank's template test.}}/) is the same as *{{Template:Note|This is Frank's template test.}}*
- You can "transclude" any page into any other with the following
*{{:Some page}}*, this works for the Main namespace, for others, you need to use the namespace *{{Help:Info page}}*
- The <noinclude> tag just says, don't copy this part over as a part
of the template, but it can be used to show stuff on the page
- The example above has one "input" to the template that is un-named
{{{1}}}, the pipe after just says, if there isn't anything passed through, just leave it blank, otherwise it would actually pass through {{{1}}} if the user didn't pass anything.
- You can play with named values {{{color|}}} & {{{text|}}}, etc.
Regards, Bryan
On Mon, Jan 28, 2019 at 12:24 AM Frank Rueter | OHUfx <frank@ohufx.com mailto:frank@ohufx.com> wrote:
Thanks a lot Manuela! I will look at defining the simple css classes required to make those examples work. I was just under the impression that these would already exist in the default install. Will give it a go, thanks again! frank On 28/01/19 8:42 PM, Manuela wrote: > Hi Frank, > > for me this special page helps a lot: > https://www.mediawiki.org/wiki/Special:ExpandTemplates > > Enter following text into the input box: > > {{note|Foo}} > {{note|Foo|reminder}} > {{note|Foo|error}} > {{note|Foo|gotcha}} > {{tip|Foo}} > {{note}} Loose test > > and check out the result. > There is still a lot of work to be done because of the css-classes used, > check out the talk-page of the template: > > https://www.mediawiki.org/wiki/Template_talk:Note > > After defining the appropriate classes in your common.css you might define a > template like this: > > <div style="background-position: left 7px top 50%; padding-right: 0.5em; > padding-left: 40px;" class="{{#switch:{{{2|info}}} > |info=note-info > |reminder=note-reminder > |error|gotcha=note-error > |... > |#default=}}" >{{{1|Foo}}}</div> > > hth > Manuela > > > > -- > Sent from: http://mediawiki-i.429.n8.nabble.com/ > > _______________________________________________ > MediaWiki-l mailing list > To unsubscribe, go to: > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org