Templates

From Redazione
< How it works
Revision as of 09:54, 18 November 2020 by Admin (talk | contribs)
Jump to navigation Jump to search

Templates are a way to insert elements commonly used among your pages 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 or Mediawiki's 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 wiki 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 avoids 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.


Accordion

{{CI accordion
|Why should I use this website? 
|Of course that's a your choice ... 

|Why canapes tend to fall on the wrong side? 
|Because the specific weight of the bread ... 

|Why should I wake up my sons so early to bring them at school ? 
|To prevent it grows some odd idea in their dreams...
}}


which produces the following

Why should I use this website?
Of course that's a your choice ...
Why canapes tend to fall on the wrong side?
Because the specific weight of bread is less than ...
Why should I wake up my sons so early to bring them at school ?
To prevent it grows some odd idea in their dreams...


The accordion template (technically a Lua module) takes advantage of Dynamic components on the front-end, so basically you can add to your pages the equivalent of a paying wordpress plugin with just few lines of wiki text.