Wikidot Design & Development

Specific Notification System

Customised user messages the Wikidot way.

The premise is simple — you want to show a message to a user based on an action they have just performed. Ordinarily, you would create a new page containing the message, and perhaps some links to lead them elsewhere in the site. While this solution works just fine, it's not as streamlined as being able to show the message on an existing page of your site that the user would probably click through to anyway. Enter my Specific Notification System.

As always, the idea came to me just as I was dozing off to sleep, meaning I had to get up and act on it straight away, else I would never get some shut-eye. The system uses the recently revised limit="0" ListPages parameter to only show a message if a specific string is included in the URL, something we can control when a user completes a certain action.

So, to start things off, we setup a ListPages module with limit="@URL|0" - meaning by default no module body will be shown. Which page you select doesn't really matter, given we're not going to be using anything from the selected page itself. I also added a URL attribute prefix so as not to confuse other modules on the same page.

[[module ListPages category="blog" limit="@URL|0" urlAttrPrefix="i" separate="no"]]
[!-- Define message here --]
[[/module]]

Remove RSS link from ListPages module

It has nearly been two weeks since my last post, mainly because I’m (supposed to be) studying for exams, but I just couldn’t resist myself, so here’s a very quick little tip.

RSS link

When you use the ListPages module to generate an RSS feed, a little icon with a link to that feed is automatically added to the bottom of the list-pages-box. But if you already have a more pronounced link to your RSS feed elsewhere on your site, you may want to remove this link. By just adding the code below, now you can…

.list-pages-box .feedinfo {
    display: none;
}
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.