Wikidot Design & Development

Customisable pages with member options

Give your users more control with per-page options.

I recently discovered that you can use a ListUsers module inside a ListPages module if the former is on the page you are selecting in the latter. I’m not sure if I have come across this before; chances are I have, but yesterday I actually had an application for it. Custom options for logged-in users.

With the new set-tags buttons, we can now allow registered users to customise a page. This requires a ListUsers module, containing the options for customisation, and iftags, containing the customisations themselves. While on some pages it might be fine to show the customise options all the time, on others (such as a home page) they are an unnecessary distraction that should be hidden unless the user has clicked through to them. Enter my latest discover.

We can have the customise options in a ListUsers module on a separate page, and select them onto the page to be customised with a ListPages module, only showing the module body when a parameter is passed via the URL (as we did here).

I’ll attempt to explain how this is achieved in the code below, but it might be easier to understand by looking at this example I’ve setup on the home page.

Set tags button - first look

BMC Quickies

Quickie: First impressions of the new set tags buttons

The latest feature to arrive at Wikidot is the set tags button, which allows you to add or remove a tag or tags with a simple button action. The first impressions are good, especially given it hasn't even been officially launched yet. I'm excited to see what everyone comes up with, and what new functionality can be developed off the back of what seems a rather simple feature. To get you all started, here's my first take at setting the button to work - creating a personalised favourites list.

[!-- In a Live template --]
[[module ListUsers users="."]]
[[iftags -_favourite%%number%%]]
[[button set-tags +_favourite%%number%% text="add to my favourites"]]
[[/iftags]]

[[iftags +_favourite%%number%%]]
This app is in your favourites list. [[button set-tags -_favourite%%number%% text="Remove from favourites."]]
[[/iftags]]
[[/module]]

[!-- In user profile page --]
+++ My favourites list
[[module ListPages tags="_favourite%%name%%" separate="no"]]
* %%title_linked%%
[[/module]]

I'm interested to know what you other wikidot gurus have in mind for the new button. Consider this a brainstorming session… go!

Site design © BMC WebDesign, 2011. All rights reserved. All tutorials on this site are free for commerical use, subject to conditions outlined in the disclaimer.