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:Notice import not quite right

I exported Template:Notice from MediaWiki and tried to import it into my MediaWiki instance, but it looks like I did something wrong. MediaWiki: My instance: I would appreciate it if someone could tell me what I might be missing for the images and…
NLam
  • 537
  • 1
  • 11
  • 25
0
votes
1 answer

MediaWiki template import reports "Error: no shortcuts were specified and the |msg= parameter was not set"

I exported the Template:Warning template from Wikipedia and tried it import it into my instance of MediaWiki. The import was successful, but when I try to use the template, it just shows: Template:Warning on my page. When I go to the…
NLam
  • 537
  • 1
  • 11
  • 25
0
votes
2 answers

Add Google Fonts to a MediaWiki skin

I need to know the recommended way to add a Google font to a MediaWiki skin. I know I can use Common.css and I know there might be extensions to meet the need, but as I am developing a skin I want to add the necessary fonts with the skin. I do not…
nasirkhan
  • 9,948
  • 5
  • 27
  • 33
0
votes
0 answers

Why is the error "Script error: No such module "en-headword"" even if this module is already imported in my MediaWiki?

I have downloaded the xml containing the entry tease out along with all its templates and modules from the link https://en.wiktionary.org/w/index.php?title=Special:Export&pages=tease_out&templates. Clearly, this xml contains module…
Akira
  • 2,594
  • 3
  • 20
  • 45
0
votes
1 answer

Mediawiki templates that know what section (or subsection) they're in?

A Mediawiki template can use Magic Words to identify what page it's being transcluded into: {{PAGENAME}} — and various other details of its namespace. What I can't find out is if there's a Magic Word or some other technique to identify what section…
0
votes
1 answer

Passing down MediaWiki template arguments to custom HTML attributes

Consider a custom MediaWiki extension that adds a new tag named simplified_example with some JavaScript (just calling alert with provided argument for simplicity):
Presto
  • 219
  • 1
  • 7
0
votes
0 answers

Adding an in-page search and display within a Mediawiki page

I have been requested to add some functionality to a Mediawiki page. I am learning MW as fast as I can. We have a MW page with a very large wikitable of bibliographic data. The data is also kept in an external Excel file. It has been requested to…
0
votes
2 answers

How to transclude tags in templates to set categories only on original page

As part of a template, I'd like to set the category of a page. But also to have that category no included when that page is transcluded. So if I have a template definition for Template:Person Name:…
Adrian Cornish
  • 23,227
  • 13
  • 61
  • 77
0
votes
0 answers

Calculated categories don't work in mediawiki

I have a year-template for my mediawiki installation and it contains the following snippet: [[Category:{{#expr:{{#sub:{{PAGENAME}}|0|2}}+1}}th Century]] If I'm using it on the page 1958 the category 20th Century shows up at the bottom, but: The…
user2033412
  • 1,950
  • 2
  • 27
  • 47
0
votes
1 answer

Rename hyperlinks in query result in Semantic MediaWiki

Here is my query {{#ask: [[Category:Pages]] |mainlabel = Link |? volume = Volume |? page = Volume page |? title = Title |limit = 3 }} The result table is like (screenshot) Link Volume Volume page Title HPB-SB-1-1 …
0
votes
0 answers

include elements that users cannot remove

How do I include elements such as the {{seo:}} tag such that it cannot be seen and or removed by a user editing the page contents? I've looked at the templates, page forms, other extensions, etc. but I didn't see a way to accomplish this.
eic
  • 51
  • 1
  • 3
0
votes
1 answer

mediawiki: Assign a unique reference to each article using categories

I want to create a unique reference in each article. This is done by using catgories with the following template, which extends the PageID with a thematic prefix. {{Category:{{{1}}}{{PAGEID}}}} I have integrated it into the article like…
ozz
  • 175
  • 1
  • 11
0
votes
2 answers

Is there any limits for number of properties used in templates in Semantic Mediawiki?

Is there any limits for number of properties used in templates? We use a lot of properties in dozens templates. But from one time we can not add any new reusable property to our templates. We can create new property, add it value at the page as…
0
votes
1 answer

python3 : How to remove data inbetween two parameters of Mediawiki template

The following is the data from a Wikisource page;- {{:MediaWiki:Proofreadpage_index_template |Type=book |Title=மணி பல்லவம் 1 |Language=ta |Author=நா. பார்த்தசாரதி |Translator= |Illustrator= |Editor= |Volumes=5 |School= |Publisher=தமிழ்ப்…
info-farmer
  • 255
  • 3
  • 18
0
votes
2 answers

MediaWiki update from 1.15 to latest version

Would it be possible to upgrade from MediaWiki from 1.15 to the latest stable version without losing data? I believe I will have a problem with database tables and extensions. Thank you in advance