MediaWiki Template Templates?

Not sure if I have the right terminology. I will explain what I want to do, and you guys can tell me if this is possible.

I use MediaWiki as a customer list page. So, I have a category for clients, and, for example, I have 20 clients. Inside the real client page, I have several “headers” that make up the client page, including the info box. What I want to know is how I will “include” the headers as a template for the “Client Destination Page”. It’s clear that each “Client’s landing page” (client A or client B, etc. Etc.) has the same “headers”, but not the same contents, so all I want is it’s that on every page of the client I can include a “template” and it has the same headings with no content under the headings, so every time I change this template file, it changes it for each client, and all I need to dothis is to edit the content on the desired client page.

+3
source share
3 answers

You will need to make one large template for the entire client page in which you put all the information. I’ll give an example of a template for a page with two headings, “Client Destination Page” and “Additional Information”. The headers are fixed, and the content below this value depends on the client’s page.

First you make a template by creating a Template: Customer page

Here you put:

=Customer Landing Page=
{{{landingpagetext}}}

=More info=
{{{moreinfotext}}}

The triple reward indicates the variables that you later define on each client page. For client A:

{{customer
| landingpagetext = This is the landingpage for customer A
| moreinfotext = This customer is a vegetarian
}}

Client B:

{{customer
| landingpagetext = This is the landingpage for customer B
| moreinfotext = This customer likes Tom & Jerry
}}

, - templatename. (|) . , , ( ).

(, {{customer|Landing page text|More info text}}), , , {{{1}}} {{{2}}} .

, .

+3

( ) - Navboxes. , , ?

0

You can watch MultiBoilerPlate , I use this to set the default text on the pages. I would call it a template, but Mediawiki uses this term for something else. If you just want to load the same default text when you start a new page, and then fill it with your own text, I think this is what you need.

0
source

Source: https://habr.com/ru/post/1788498/


All Articles