Would it be possible to edit this code so it shows random pictures from the site instead of links?
Well, I believe so. That is what I am doing right now. What you do is create a page for each image. The name would be image:name of picture, and the content would simply be the url and nothing else. Then, use a ListPages like this:
[[module ListPages category="image" order="random" limit="1"]]
[[image %%content%%]]
[[/module]]
Hope this helps.
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
Is there a way to keep it random within a set of pages? I have one section of a category, and I would like to keep the random page limited to my own pages.
Use it with module "Listpages" and select your wished page-"range" by selection a
- category="…" ( or "*" ) and
- tags="+yourtagname" !
You should tag your pages with perhaps a word like your username - "shortcode" perhaps :) - and you can select here with a plus sign …
If you do not want to see these tagname on a tag cloud than you can start such tagname with an underscore!
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
ok i am wondering the same thing.. Can you please put that in simplier forms..
I do not understand your question… what is the same thing?
- the limitatin to some "own" pages ?
- or the question with the Image-urls?
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Thank you for this random feature—I need it!
I am still setting up my categories, but I want to be able to go to a random page WITHIN a particular category.
So, if I have 5 categories, would I use the same module 5 times, changing category=""*" for the name of my category?
Also, if I wanted a randomizer button, could I use this module on an image?
I have not tried this yet, but my site is at
http://marblesprings.wikidot.com/
[[module ListPages category="*" order="random" limit="1" range="others"]]
[[iframe https://files.snippets.obscurative.ru/local--code/code:iframe-redirect#%%link%%]]
[[/module]]
There is supposedly an example of this script at work at http://sandbox-old.wikidot.com/choose-a-page but I can not apply to be a member?
. . category="whatever category" is the correct selection… or
Category selector:
- "." means current category (default)
- "*" means all categories
- else, a list of space/comma delimited categories
- categories are by default additive (category OR category OR category)
- "-category" means exclude pages in this category (AND NOT)
You can putall 5 categories together ( category="cat1,cat2.." or divide them into 5 ListPages…
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
This page appears to be broken. It is probably caused by a link in the comments.
I'm a noob at WikiDot and was struggling to find/interpret coding to create a single image as a link to a random page. This is what I came up with and I thought it might help others:
1. To display an image as a link to a random page (all categories):
[[module ListPages category="*" order="random" limit="1"]]
[[image book_pages.gif link="%%page_unix_name%%" title="View a random page!"]]
[[/module]]
2. To display an image as a link to a random page (limited to certain categories):
[[module ListPages category="cat-1 cat-2 cat-3" order="random" limit="1"]]
[[image book_pages.gif link="%%page_unix_name%%" title="View a random page!"]]
[[/module]]
3. To display an image as a link to a random page (limited to certain categories) and with CSS styling applied:
[[module ListPages category="cat-1 cat-2 cat-3" order="random" limit="1"]]
[[div style="border:2px dotted #f60;height:90px;width:180px;margin:auto;"]]
[[image book_pages.gif link="%%page_unix_name%%" title="View a random page!"]]
[[/div]]
[[/module]]
In version (3) - I have created a dotted border, a fixed height and a fixed width. The margin:auto; forces the fixed-width div to center in my sidebar.
See it in action, in the sidebar, at: http://cumbriaskills.wikidot.com/
It is not about what you can learn - it is about how you apply that learning…
%%page_unix_name%% is deprecated so it's better to use %%fullname%% (https://wikidot-proxy.obscurative.ru/doc:listpages-module#toc10)
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Thanks Rob. Still learning - will fix mine now.
It is not about what you can learn - it is about how you apply that learning…
I copied one of the code blocks into my main page, assuming it would be a link. So now, as soon as I click on Home, I get redirected to a random page. Just want to make sure no one makes that accident again.
(And yes, I fixed it, don't worry)