Conversant’s Conditional Love

Seth Dillingham had a busy week writing documentation for a new feature of Conversant — conditional macros. Conditional macros probably take a bit more time to get a handle on than other features in Conversant, but if I can figure them out you probably can too.

Essentially they allow web adminstrators to do sophisticated if-then operations with macros. Why would you want to do this? Take my problem. Many months ago I posted to the support site that I’d like the ability to segregate web content — essentially what I wanted to do was create a premium content subscription area. One of the things I’d also like to do is remove the ad banners just for those folks. With the power of conditional macros, it only took a few minutes to implement this.

First, I created a “Group” called premium. Anybody wise (or foolish depending on your view) to send me any money gets added to the premium group. Then I just add this handy dandy macro to the page templates for the site:





“>http://www.burstnet.com/ads/ad5729a-map.cgi”>
http://www.burstnet.com/cgi-bin/ads/ad5729a.cgi”
BORDER=”0″ WIDTH=”468″
HEIGHT=”60″>


The first line simply tells Conversant that if the person viewing the site is a member of the “premium” group, don’t do anything at all. If they’re not a member of the “premium” group, however the “else” statement on the second line tells Conversant to display the ad code. The “endif” on the last line simply tells Conversant that this little if-then operation is finished and it should continue displaying the rest of the page.

Plus, as usual, it does all of this quickly. I could not see any difference at all in page rendering time when testing the speed with and without this conditional macro.

Leave a Reply