Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

About templates: Difference between revisions

From ISSS Wiki
m Infos about available templates
m How to create templates
Line 8: Line 8:
* '''Modification'''<nowiki>: If you change the content of the template, it will automatically update on all the pages where the template is used. For example, if you change “Template:Welcome” to say “Hi there! Welcome to this wonderful wiki.”, all pages using { {Welcome}} will now display the new message.</nowiki>
* '''Modification'''<nowiki>: If you change the content of the template, it will automatically update on all the pages where the template is used. For example, if you change “Template:Welcome” to say “Hi there! Welcome to this wonderful wiki.”, all pages using { {Welcome}} will now display the new message.</nowiki>


=== Templates that can be used ===
== Available templates ==
Click on the different templates to view them and see the available variables.
Click on the different templates to view them and see the available variables.


Line 34: Line 34:


Describes a software.
Describes a software.
== How to create templates ==
If you need to create a new template that suit the content you want to add to this wiki, here the steps to create new templates :
# '''Create a new page''': The first step is to create a new page in the MediaWiki. The name of this page should be prefixed with “Template:”, assigning it to that namespace. For example, if you want to create a template named “Welcome”, you would create a page called "Template:Welcome".
# '''Add content to the template''': Once the page is created, you can add the content that you want to be displayed whenever the template is used. For instance, if you add the text “Hello! Welcome to the wiki.” to your “Template:Welcome” page, you have created your first template.
# '''Use the template''': To use the template, insert the code <code><nowiki>{ {Welcome}}</nowiki></code> (without spaces between the braces) in any other page. When that page is viewed, the text “Hello! Welcome to the wiki.” will appear instead of <code><nowiki>{ {Welcome}}</nowiki></code>. This process is called "transclusion".
# '''Update the template''': If you change the content of the template, all pages that use the template will display the new content. For example, if you change the template contents to “Hi there! Welcome to this wonderful wiki.”, any page where the template was used will display the new text instead of the original one.