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
23
votes
4 answers

Passing an equal sign ('=') to a parameter in a MediaWiki template

How can I use a '=' character in a template parameter without breaking the template parser? I'm not a MediaWIKI developer so I haven't debugged the code or checked the logs, I'm hoping someone here has a tip for escaping characters passed to…
scubasteve
  • 2,718
  • 4
  • 38
  • 49
22
votes
3 answers

Where can I get templates for MediaWiki?

I have noticed that a lot of mediawiki-based websites use such templates as Robelbox, Ambox etc. Where can I get them and how should they be installed?
Squid
  • 237
  • 1
  • 2
  • 3
10
votes
3 answers

Mediawiki link within the page to a specific place, rather than a section

1. Question If I code like the following, then I have a link within the page to a specific "section" [[#SectionTitle|displayed text]] But what if I want to have a link within the page to a place, I mean any place? Sometimes I might want to directly…
user1849133
  • 527
  • 1
  • 7
  • 18
8
votes
2 answers

Lua error on MediaWiki

I'm trying to set up a MediaWiki, and trying to use the Navbox template. I had everything working fine on my local machine, but when I copied it all to the server I get Lua script errors, specifically: Lua error at line 302: attempt to call field…
yedidyak
  • 1,964
  • 13
  • 26
8
votes
3 answers

Setting a non-binding space in a semantic record

Is there anyway to allow for a non-binding space   or other HTML encoded character to be used in a semantic record? The issue I am running into is that the ; character gets treated by the software as the end of a record. For example: Say I…
Zack
  • 2,377
  • 4
  • 25
  • 51
7
votes
2 answers

Variable in MediaWiki for the current user

In MediaWiki, you can use a variable ("Magic Word") such as {{PAGENAME}} or {{REVISIONDAY}} to get specific information related to the current page being viewed. Is there a similar variable (or perhaps a different way) to get the current user…
romeboards
  • 387
  • 5
  • 19
6
votes
3 answers

Conditional categories

I'm using a template {{MyTemplate|foo}} which consists of the following code: {{#switch: {{{1}}} | foo = [[Category:Foo]] | bar = [[Category:Bar]] | #default = [[Category:Unknown]] }} When I'm using it on a page, the categories show up nicely as…
user2033412
  • 1,950
  • 2
  • 27
  • 47
6
votes
1 answer

How can I pass some MediaWiki markup (here: a table) to a template?

I'm looking for a way that a user may specify a table - i.e. by specifying it in MediaWiki syntax - to a template. The template should then put this table in the context of some larger output provided by the template. A simple example. Is there a…
Regis May
  • 3,070
  • 2
  • 30
  • 51
6
votes
2 answers

Headings created inside of a template

I have a number of templates that create headings based on a formula. I am wondering if there is anyway to create an "edit" link that will take you directly to that section? The way that it currently works, the edit link takes you to editing the…
Zack
  • 2,377
  • 4
  • 25
  • 51
6
votes
2 answers

Query inverse relationships in Semantic MediaWiki

In my semantic Scandalous Poets Wiki, I'd like to be able to query all pages with properties with a particular value, ideally grouped by property. For instance, given the value "Lord Byron" I'd like to receive a list like so: Son of: Catherine…
meetar
  • 7,443
  • 8
  • 42
  • 73
4
votes
1 answer

Semantic Mediawiki #ask query with long result

I use Semantic Mediawiki and Semantic Forms. I made a form that uses subobjects. So for showing on Mediawiki page the text that user has written in my form - I use #ask query and wiki template. My ask code is like this: {{#ask: [[-Has…
4
votes
2 answers

How do I insert tables inside infoboxes on Wikia pages?

I want to insert tables in infoboxes. For example, I have a proteinbox I've developed using the infobox template (http://health-and-medicine.wikia.com/wiki/Template:Proteinbox), and its FASTA field is too large to fit comfortably in the proteinbox.…
Josh Pinto
  • 1,453
  • 4
  • 20
  • 37
4
votes
1 answer

How to resolve template loop detected issue in MediaWiki

Recently, I have installed MediaWiki version 1.22 onto my local machine. I have added few templates pages, when I'm trying to use them, it displays Template loop detected: I also deleted some of old pages using admin login, but still it showing…
made_in_india
  • 2,109
  • 5
  • 40
  • 63
4
votes
3 answers

How to add custom/extra attributes to Mediawiki links?

I'm creating template on a personal wiki and I want some of the links to have custom attributes (e.g. rel, class, etc.). Using HTML Syntax I tried to put it as HTML code, but it's then escaped:
Édouard Lopez
  • 40,270
  • 28
  • 126
  • 178
4
votes
2 answers

Equals signs in Wikipedia template parameters won't display properly

I've noticed that using links with equals signs in them doesn't seem to work properly (when the link is placed inside the {{missing information}} template). Is there any way to work around this limitation so that links with equals signs can be…
Anderson Green
  • 30,230
  • 67
  • 195
  • 328
1
2 3
12 13