About templates: Difference between revisions

From ISSS Wiki
Jump to navigation Jump to search
(Created page)
 
(Removed Categories)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
===What are templates===
===What are templates===
MediaWiki templates are essentially pre-formatted pieces of text that can be included in other pages1. They are designed to be transcluded (embedded) inside other pages2. Here’s a simple explanation:
MediaWiki templates are essentially pre-formatted pieces of text that can be included in other pages. They are designed to be transcluded (embedded) inside other pages.


* Creation: You create a page in the “Template” namespace. For example, you might create a page called “Template:Welcome” with the contents: "Hello! Welcome to the wiki."2.
* '''Creation''': You create a page in the “Template” namespace. For example, you might create a page called “Template:Welcome” with the contents: "Hello! Welcome to the wiki.".


* Usage: You can then insert this template into any other page using the code { {Welcome}} (without the spaces). When that page is viewed, the text “Hello! Welcome to the wiki.” will appear instead of { {Welcome}}. This is called "transclusion"2.
* '''Usage'''<nowiki>: You can then insert this template into any other page using the code { {Welcome}} (without the spaces). When that page is viewed, the text “Hello! Welcome to the wiki.” will appear instead of { {Welcome}}. This is called "transclusion".</nowiki>


* Modification: 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 message2.
* '''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>
 
== Available templates ==
Click on the different templates to view them and see the available variables.
 
* [[ISSS President]]
* [[Template:ISSS Member|ISSS_Member]]
* [[Template:ISSS BoardMember|ISSS_BoardMember]]
 
Those templates can be used to present different types of '''ISSS Wiki''' users. Depending of the user, use the corresponding template.
 
* [[Template:ISSS Conference|ISSS_Conference]]
 
Describes conferences or events about ISSS.
 
* [[Template:Systems Book|Systems_Book]]
 
* [[Template:Systems BookChapter|Systems_BookChapter]]
 
With those templates, you can create pages about books and their chapters.
 
* [[Template:Systems JournalArticle|Systems_JournalArticle]]
 
Describes an article, can be used to describes any kind of papers, reviews, news...
 
* [[Template:Systems Software|Systems_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.

Latest revision as of 09:15, 15 February 2024

What are templates

MediaWiki templates are essentially pre-formatted pieces of text that can be included in other pages. They are designed to be transcluded (embedded) inside other pages.

  • Creation: You create a page in the “Template” namespace. For example, you might create a page called “Template:Welcome” with the contents: "Hello! Welcome to the wiki.".
  • Usage: You can then insert this template into any other page using the code { {Welcome}} (without the spaces). When that page is viewed, the text “Hello! Welcome to the wiki.” will appear instead of { {Welcome}}. This is called "transclusion".
  • Modification: 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.

Available templates

Click on the different templates to view them and see the available variables.

Those templates can be used to present different types of ISSS Wiki users. Depending of the user, use the corresponding template.

Describes conferences or events about ISSS.

With those templates, you can create pages about books and their chapters.

Describes an article, can be used to describes any kind of papers, reviews, news...

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 :

  1. 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".
  2. 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.
  3. Use the template: To use the template, insert the code { {Welcome}} (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 { {Welcome}}. This process is called "transclusion".
  4. 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.