Choose A Page!

By ErichSteinboeckErichSteinboeck

Description

Here is the code for a funny “random” page chooser.

Depending on the number of pages on your site (or in the ListPages categories that you specify), you would scale up & down the block of page links with the image width and height attributes and (if you wish so) make the block approximately square with the cell style="width:…" specification.

If image width and height are set to "1", each pixel is a link to one of your pages — probably the most compact way to view your site!

From time to time, if more pages are being added to your site, you might want to revisit all width and height specifications. You also might want to regularly change the ListPages sorting order to make the order of the pages look more “random” to your users.

You may copy Black1x1.png — an image with a single black pixel — to your site, attach it to your page, and adapt the image tag's path. Note that you must specify the page name ([[image page-name/Black1x1.png …]]) to make ListPages work correctly.

Code

[[table]]
[[row]][[cell]]**Choose a page!**[[/cell]]
[[cell style="width:80px"]]
[[module ListPages category="*" separate="no" \
order="pageLengthDesc" perPage="9999"]]
[[image code:choose-a-page/Black1x1.png \
width="8px" height="8px" link="%%page_unix_name%%"]]\
[[/module]]
[[/cell]][[/row]]
[[/table]]

In action

Choose a page!
Black1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.pngBlack1x1.png
page 1 of 3123next »

As snippets.wikidot.com has relatively few pages, have a look at http://sandbox-old.wikidot.com/choose-a-page for a site with a little more more pages. There is also a similar snippet which uses a single url link to a random 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 ErichSteinboeck

TOC's from many pages - 16 Feb 2012 01:47
Redirect: To - 16 Feb 2012 01:37
Module Listpages Tags - 16 Feb 2012 01:24
Module Feed Drilldown: Details Page - 16 Feb 2012 01:24
Module Feed Drilldown - 16 Feb 2012 01:24
Module Feed: Collapsible - 16 Feb 2012 01:23
Module Categories - 16 Feb 2012 01:23
MiniRecentPosts With Limit - 16 Feb 2012 01:23
ListPages: Horizontal? - 16 Feb 2012 01:20
Redirect: From (1st) - 01 Mar 2009 18:18
Redirect: From (2nd) - 01 Mar 2009 18:17


Rate this solution

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

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