Use any html code on a page

By Helmut_pdorfHelmut_pdorf

Description

It is possible to use almost any HTML code on your Wikidot site - for security reasons it will be rendered inside an iframe though.

Example (aNobii embeded code)

You might be given some code that looks like this (in this case, it is a "book shelf" badge from aNobii):

<!-- 1 This is the HTML section of the badge -->
<div id="badge">
 <script type="text/javascript" src="http://www.anobii.com/anobi/badge_generator.php?p=012d64e5c2a5327d15&language=2,4&tag=0,11,9,1,8,5,6,4,10,3&count=5&recent=1&progress=3&title=title&subtitle=0&author=0&img=small&link_to=1&az_site=&a_id="></script>
</div>
<!-- Badge ends -->

Simply surround this with the HTML block syntax ([[html]] ... [[/html]]) and add it to your wikidot site's page, like this:

[[html]]
<!-- 1 This is the HTML section of the badge -->
<div id="badge">
 <script type="text/javascript" src="http://www.anobii.com/anobi/badge_generator.php?p=012d64e5c2a5327d15&language=2,4&tag=0,11,9,1,8,5,6,4,10,3&count=5&recent=1&progress=3&title=title&subtitle=0&author=0&img=small&link_to=1&az_site=&a_id="></script>
</div>
<!-- Badge ends -->
[[/html]]

In action

Using the above code should put something like this on your page:


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 Helmut_pdorf

Sorted-ListPages-List - 06 Jun 2021 03:46
Todo List with Data Forms - 30 Apr 2015 14:59
Html(embed) code opening in new window/tab - 29 Oct 2014 09:05
Facebook Button - 27 Dec 2013 15:03
Advanced Search - 25 Feb 2012 12:29
Top Nav Menu with ListPages - 16 Feb 2012 01:48
Schedules - 16 Feb 2012 01:40
Find untagged pages - 15 Feb 2012 00:52


Rate this solution

If you think this solution is useful — rate it up!

rating: +11+x
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License