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
3
votes
1 answer

How to get Wikipedia templates to work with MediaWiki

I exported a category of Wikipedia, checking the include templates as I did so and imported it into a MediWiki install, but all the pages are messed up how do get all the necessary templates so the page displays properly?
user395665
  • 31
  • 3
3
votes
2 answers

Extension:External Data and Categories

Situation I retrieve data from a CSV-source using the external data-extension for mediawiki: {{#get_web_data:url=http://example.com/names.txt|format=csv|data=name=1}} {{#display_external_table:template=AddCat|data=1=name }} The file names.txt…
user2033412
  • 1,950
  • 2
  • 27
  • 47
3
votes
1 answer

Get only the page name from a subpage url in MediaWiki

I installed Lua support and the Module:String module in MediaWiki and I'm trying to get only the second half of a link in a template. template: Icon {{Icon|Icon.png|mypage/Mysubpage}} would return a link to the subpage while only showing "Mysubpage"…
HypeWolf
  • 750
  • 12
  • 29
3
votes
3 answers

Dbpedia extraction framework - how to strip mediawiki formatting markup

I'm playing around with the dbpedia extraction framework. It seems very nice, and I'm happily building ASTs of wikipedia pages and extracting links (using WikiParser). However although I get a nice structured tree from the parse, I notice that the…
Alex Wilson
  • 6,690
  • 27
  • 44
3
votes
1 answer

How can I display spaces in Media Wiki Page Title but not in the URL?

How can I display spaces in Media Wiki Page Title but not in the URL? Desired Result: if someone types in example.com/w/John1:1-5 then I'd like the page title on that page to show John 1:1-5. I realize I could create a page at…
3
votes
2 answers

Create a MediaWiki template to set font color in pages

I just installed Mediawiki and realized that it is very complicated to configure it for newbie. As one of my first entry I wanted to change font color with: {{ font color | green | green text }} To do that I imported Template:Font color from…
bLAZ
  • 1,689
  • 4
  • 19
  • 31
3
votes
1 answer

Template with variable number of parameters

I'm working on setting up a wiki for a small game and I'm facing a problem concerning templates. Organization of the wiki : This game has regions, which are made up of several levels. My wiki has one page for each region, and this page contains…
3
votes
2 answers

Semantic Mediawiki: Sort values by date

Like the topic says I want to order values by date. I'm using the code [[Einspiel_{{{1}}}::{{{2}}}| ]]{{{2}}} in an template to easily refer a value to a variable. {{{1}}} is the name of my variable and {{{2}}} is the date (dd.mm.yyyy). As it is…
3
votes
1 answer

Collision between Semantic MediaWiki and C++ namespace syntax

To describe some C++ classes and provide how-to's, we are successfully using a MediaWiki-based wiki for years. The documented classes are typically defined in a C++ namespace, so we use wiki pages named after the cppnamespace::classname…
Wolf
  • 9,679
  • 7
  • 62
  • 108
3
votes
1 answer

Semantic mediawiki capture all values of a property in the current page

I'd like to summarize data entered using a template which can occur multiple times per page. I want this summary to be based only on the current page. I can't seem to figure out how to capture all the values assigned to a property set by the…
bjg
  • 115
  • 6
3
votes
2 answers

How can one detect transclusion depth?

In MediaWiki, is there a standard pattern that you can include in a template body to detect depth of transclusion? Specifically, let's assume Template:Myinfobox contains such a pattern that displays "native myinfobox call" for depth 1…
JR Bouvier
  • 31
  • 2
3
votes
3 answers

MediaWiki templates inherit parameters.

Is it possible to get a template to inherit parameters from another template? I can't think of a better way to phrase the question so allow me to give an example. Say you have two templates {{test1}} and {{test2}} that are being used on a page…
Zack
  • 2,377
  • 4
  • 25
  • 51
3
votes
1 answer

Passing parameters from Dynamic Page List to Semantic Mediawiki

I'm trying to created a template that will output a dynamic report by generating a list of pages with Dynamic Page List and then run queries on each page using Semantic Mediawiki, outputting the whole mess in a table. The structure of the template…
2
votes
1 answer

Mediawiki css/html infobox creating blank rows

I'm very new to MediaWiki, HTML, CSS, and programming in general. I'm using the ParserFunctions extension for the if statement to delete the rows when its empty. When I use the template, for every two rows that are deleted, it creates 1 blank row on…
bradeblo
  • 23
  • 4
2
votes
1 answer

Is it possible to add css for mobile in fandom wiki?

The mobile version of the fandom wikis are very restricted, and actively strips away all style tags from html elements. I tried to define styles in MediaWiki:Common.css and that works on desktop, but it does not apply on mobile. I have also tried to…
awe
  • 21,938
  • 6
  • 78
  • 91
1
2
3
12 13