Welcome!

Snippets is a site both created by Wikidot and its community. This is a place where you can find (or add) code snippets that can be used when creating your own pages at Wikidot.com. Code snippets are easy way to improve your own wiki sites and to make it more attractive and functional. Embedding media, both audio and video, adding spreadsheets, making eye candy menus is as easy as never before.


Add a new snippet or solution

Adding a snippet is easy.

  • first think of some name for your snippet
  • create a page (using the form below)
  • assign page tags to the created page

Most Rated Solutions

Collapsible Text Block (Rating: 218, Comments: 22)

This solutions will show you how to make nice collapsible text blocks. What for? See the examples, you should know.

Foldable List (Rating: 182, Comments: 11)

Do you like a foldable list from My Account or Site Manager? Create your own!

Layout With Tables (Rating: 107, Comments: 73)

A nice way to add advanced layout control using the [[table]] tag. The example uses the style attribute for the whole table and particular cells to adjust layout.

Tabs (Rating: 106, Comments: 45)

This solution will show you how to create tabs.

Google Gadgets (Rating: 91, Comments: 26)

Google now offers tons of gadgets one can embed into web pages. The directory of gadgets is available at:

Include Any Page (Rating: 90, Comments: 30)

Here is a way to include ANY page within your Wiki page using an [[iframe]] element.

Automatic Sitemap (Rating: 89, Comments: 19)

It is quite important to have a nice and clean structure of the site. One of the best ways to do maintain such a structure is to use the "parent page" relation. This allows to:

  • display breadcrumb navigation element within pages
  • make nice sitemaps and listings

Extra Side Bar (Rating: 84, Comments: 8)

Creates an extra side-bar using the floating div element. It is quite easy if you know CSS.

Multicolumn Layout (Rating: 75, Comments: 8)

OK, so you want a multicolumn layout. Unfortunately there are no special wiki tags for multicolumn layout but the result can be easily achieved using the [[div]] tags and adding CSS style to it.

Adding A Site Logo (Rating: 73, Comments: 30)

This snippet lets you add a logo to the site by creating a custom CSS.

Recently Added/Edited Solutions

Extended NewPage Module (Rating: 2, Comments: 1)

Quite similar to the built-in NewPage Module, this snippet provides a way for you to create (or jump to) new pages.

Delicious Linkrolls (Rating: 1, Comments: 1)

This solution describes how to use the delicious linkrolls to display a list of your favorite delicious links on a wikidot page.

Recent Changes (mini) (Rating: 11, Comments: 3)

Allows you to put a small list of recently edited pages e.g. within your side-bar. See more details at the documentation of the ListPages module.

CSI Cross site includes (Rating: 5, Comments: 3)

This description is not a description of a specific problem solver. It is a promotion of a new technique. As more advanced wikidot users that search here for code snippets, you will be well aware of the [[include]] function.

Remove duplicate results (Rating: 5, Comments: 2)

Sometimes, if you are using the ListPages module for data presentation, you may list duplicate results. In such cases, you can use this special add-on to remove all duplicated instances, and place them in a list.

MP3 Player (Rating: 21, Comments: 3)

With the traditional MP3 Player, you need to manually inject your MP3's url into the html code. This also means you need an individual code block for each song you want to play.

Spoiler tags (Rating: 5, Comments: 7)

Ever wanted to hide some text from someone when the page loads, but make it easily accessible when they want to read it? That's usually what spoiler tags are used for.

iframe embed (Rating: 11, Comments: 9)

Throughout the whole of Wikidot, people are putting HTML code into code-blocks, and then iframing the Wikidot-generated HTML page.

iframe redirect (Rating: 2, Comments: 2)

Although Wikidot's Redirect Module is useful, it doesn't allow you to use variables (via includes or the ListPages module) within it. In such times, you may want to iframe this special javascript redirect.

Animoto (Rating: 6, Comments: 2)

[[note]]

page_revision: 30, last_edited: 1253341827|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License