By wikic
This tutorial is for authors who want to use html to format wiki pages and prefer not to learn wiki formatting code.
The following code is an example of how to use html:
[[iframe http://wiki-name.wikidot.com/page-name/code/1]]
[!--
[[code type="HTML"]]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>title</title>
</head>
<body>
<h1>Introduction</h1>
<p>
A paragraph of text…
</p>
</body>
</html>
[[/code]]
--]
- Replace wiki-name with the name of your wiki
- Replace page-name with the name of the wiki page to be created
The iframe element is used by the wiki software to embed html code, usually from another URI but also from the URI of the wiki page that includes the html code.
Each wiki page assigns automatically an identification number for verbatim text boxes (shown with dash marks (-) surrounding the verbatim text). Therefore the first verbatim text box would have an identification number '1', the second verbatim text box in the page would have identification number '2' and so on. In the example above, the verbatim text boxes are created by the element 'code', with the attribute 'type="html"'. Other types such as 'php' are also acceptable.
To hide verbatim text boxes use the standard comment syntax for html except that the markup declaration open, close delimiters are [ and ] respectively, i.e. [!-- and --].
Thanks to tsangk for this great snippet: conditional-blocks
text above inserted with:
[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]
Other snippets posted by wikic
Rate this solution
If you think this solution is useful — rate it up!
That's not correct. The identification number, e.g. /code/1, is applied to the first codeblock on the page which is [[code]]..[[/code]]. It does not add a identification number to the comment tags [!-- .. --].
Rob
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
There is an error: the dollar sign is to replaced with two dash marks and the right square bracket. The wiki software converts the two minus signs (-) into an endash sign (- -). Also there is supposed to be two minus signs after the exclamation mark (!), NOT the endash sign (—).
Use @@…@@ for literal text that shouldn't be interpreted as Wikidot tags. I've done those changes.