Templates

From Redazione
Jump to navigation Jump to search
Line 1: Line 1:
Templates are a way to insert elements in a wiki page by reference, and they usually transform one or more parameters provided to the template in some new element. Besides all the [https://en.wikipedia.org/wiki/Wikipedia:Template_index wikipedia's templates] or [https://www.mediawiki.org/wiki/Category:Templates mediawiki templates] which can be used or imported if missing, here are some additional templates specifically created for this platform. To use them, go to "Edit source" in the top menu, and insert the text as shown below.
+
Templates are a way to insert commonly used elements by reference, and they are usually invoked with one or more parameters which will be wrapped or transformed by the template in various ways. Besides all the [https://en.wikipedia.org/wiki/Wikipedia:Template_index Wikipedia's templates] or [https://www.mediawiki.org/wiki/Category:Templates Mediawiki templates] which can be used or imported if missing, here are some additional templates specifically created for this platform. To use them, go to "Edit source" in the top menu, and insert the text as shown below.
  
  

Revision as of 20:18, 24 August 2020

Templates are a way to insert commonly used elements by reference, and they are usually invoked with one or more parameters which will be wrapped or transformed by the template in various ways. Besides all the Wikipedia's templates or Mediawiki templates which can be used or imported if missing, here are some additional templates specifically created for this platform. To use them, go to "Edit source" in the top menu, and insert the text as shown below.


text highlight

{{CI text highlight| text to highlight}}

produces:

text to highlight


inline logo

{{CI inline logo}}

produces:

Cultura italiana


notice box

{{CI notice box | some notice }}

produces:

some notice


pdf thumbnail link

{{CI pdf thumbnail link | Knuth-plass-breaking.pdf }}

produces:

{{{caption}}}

(a thumbnail of the first page of the pdf, with direct link to read it)


clear div

{{CI clear div }}


the latter does not show anything, but avoid the elements above it to float if they are floating elements, precisely like the pdf thumbnail link above (indeed, if you look the wiki text, you will see that we have put it right below it, otherwise this paragraph would have shown on the right of the thumbnail instead than below it.