Questions tagged [mediawiki-templates]

In MediaWiki, templates provide a way to include one page into other pages. This tag is for questions about template code and functionality.

From Help:Templates:

If you have standard texts you want to include on several pages, the MediaWiki template feature comes into play.

Templates are standard wiki pages whose content is designed to be transcluded (embedded) inside other pages. Templates follow a convention that the name is prefixed with "Template:", assigning it to that namespace; besides this, you can create them like any other wiki page.

191 questions
0
votes
1 answer

MediaWiki template table conditional columns

I have a template in my MediaWiki to display information in a tabular manner. The template looks like this (shortened for better overview): {| align="center" border="1" cellpadding="1" cellspacing="1" style="width: 400px" | colspan="2"…
Kai Hatje
  • 431
  • 6
  • 17
0
votes
0 answers

Mediawiki Internal error when saving templates

everyone, I am trying to create a template for mediawiki so that's what i am doing: creating a new page called Template:test put "{{{1}}}" as text save then I get an Internall Error page with text: [ca127b174f26a5c978fe0ec0] …
r.redmage
  • 1
  • 1
0
votes
2 answers

pass parameter to nested template

I'm trying to set up a page in our wiki which covers certain parameters of a specific operator in our software. Every parameter in the software can be of a certain type, like "Menu" or "Toggle". So I thought I'll create 2 Templates. First is called…
Markus Heckmann
  • 307
  • 1
  • 6
0
votes
0 answers

Processing all 'vardefine's before using the variable as a template parameter

I'm attempting to transclude this progress bar template at the top of a Mediawiki page: http://wiki.openstreetmap.org/wiki/Template:Progress_Bar. The template can be used with the parameters 'min', 'max' and 'current'. There are 'max' items I would…
yawuma
  • 1
  • 1
0
votes
1 answer

Moving from 1.21 to 1.27 Infobox Broken

http://wiki.armaina.com/index.php/Munin This is just one page but all of my pages that use the infobox on the right there do this on mediawiki 1.27 http://wiki.armaina.com/index.php/Template:Character This is the template being used for the…
Armaina
  • 3
  • 2
0
votes
1 answer

How do I use a parameter in an #if value in mediawiki?

I'm trying to create a mediawiki template: |- | {{{name}}}{{#if:{{{ref|}}}|{{{ref}}}|}}{{#if:{{{ndb|}}}|https://ndb.nal.usda.gov/ndb/foods/show/{{{ndb}}}|}} || {{{size|--}}} || {{{carbs|--}}} || {{{sugar|--}}} || {{{fiber|--}}}…
Justin808
  • 20,859
  • 46
  • 160
  • 265
0
votes
2 answers

Portal on MediaWiki

I'm trying to configure Portals on a local MediaWiki bug i'm stuck. ParserFunction extension is installed. Portal namespace is configured. Now i have to copy / import templates from Wikipedia. Templates imports I don't understand how to do it…
0
votes
1 answer

Parse Wikipedia dump into plain text where preserving the structure (sections)

I have been searching for wikipedia dump parser into customizable xml , basically each article should be parsed into a set of section tags , containing the section plain text of the article. I come up with the following solutions DizzyLogic…
Yamen Ajjour
  • 1,422
  • 13
  • 32
0
votes
2 answers

How are template parameters assumed when following specified numbered parameters?

As far as I understand, the following function: {{mytemplate|foo|bar|snakes|boat|programming}} has the following parameters automatically filled for it: {{mytemplate|1=foo|2=bar|3=snakes|4=boat|5=programming}} How does the following function…
Anon
  • 2,267
  • 3
  • 34
  • 51
0
votes
1 answer

How to remove certain letters from input string in Mediawiki?

I've created a new Wiki entry, which uses a Wiki template called filter. This is how it looks: {{filter |ListofFruits= * Apple * Orange * Banana }} Now I want to retrieve the list in my filter template, but without the * and without a linebreak.…
Otaku Kyon
  • 415
  • 1
  • 9
  • 19
0
votes
1 answer

Mediawiki Template options

I have my template and for the most part it does work, there are two things wrong. I want the Progress bar to Align left of the page, and I also want the percentage to show.
user770022
  • 2,899
  • 19
  • 52
  • 79
0
votes
2 answers

Comma after extension

I have problem, I have that string in mediawiki arrays: lorem (ipsum, dolor).jpg, lorem (ipsum) (dolor).JPG, lorem.png and i want find comma after extension, my regex like that: /(jpg|png|bmp|jpeg),/i template: {{#arraydefine:f|lorem (ipsum,…
0
votes
3 answers

Changing page title as it appears in MediaWiki category

I've been trying to use DEFAULTSORT to sort pages based on a template parameter instead of the page title. This is how it appears at the top of the template: {{DEFAULTSORT:{{{Username}}}}} This is how it appears after the argument is…
user5137213
0
votes
1 answer

Use 'MediaWiki UI' or 'Bootstrap3' styles in all the forms of Mediawiki

I am working on my own Mediawiki installation and developed a skin based on Bootstrap 3 (MediaWikiBootstrap). There are a few issues which are taking time to resolve and few cases i am not sure how to resolve. I used ContactPage extension and could…
nasirkhan
  • 9,948
  • 5
  • 27
  • 33
0
votes
1 answer

"Template:!" output from imported MediaWiki template (Infobox)

I am quite new to Mediawiki and am trying to get infoboxes work. I managed to get a simple one working but am now trying to get the 'Infobox video game' one working. I am getting the following errors: Template:!- style="" Template:! Developer(s) ||…