Specials
to show special offers on your site
RedirectUrl macro
gets the redirect url for navigations
GetSessionLanguage
gets language abbreviation
Macro PickLanguage
Makes links to change front end language
VarSku macro
return the varsku of the first variant of a product.
LanguagePageSwitch
enables you to switch between similar pages in different page trees
InShopCredit macro
macro to show users in shop credit
EmailEncode
Encodes an email address for safe inclusion on a public website.
TitleCase
Converts to Title Case
Smiley macro
it searches two directories that contain macros and will return a random smiley to the page
WebGUI Macros Documentation
A 20+ page document covering 32 WebGUI macros. Included are screenshots and instructions for using each.
Updated UsersOnline Macro for WebGUI 7.5
Update Profile v.0.1
Synopsis
Root Url
Returns the top most root of the url string after the domain name.
For instance, if you're calling this under '/service/something/somethingelse', it returns 'service'.
We are using this to serve random ads for a service from a directory named th
mySubscriptions macro
Templatable macro for displaying the subscriptions a user has on the newsletter Asset and a link to edit them.
ParentPageURL
How do I make it a link where it links back to itself?
Eventually I would like to modify this module to be
strictly ParentPage(
GoogleMaps Macro
NAME
WebGUI::Macro::GoogleMaps
DESCRIPTION
The GoogleMaps macro allows you to display a google maps map containing markers at the addresses in an address list. Clicking on the markers opens a templatable popup infoc 'cloud'. Additionally a side b
Avatar macro
Macro for displaying a users avatar, photo or other image.
#-------------------------------------------------------------------
process ( userId, fieldName, alt1, [altImage], [alt2] )
Returns an XHTML 1.0 strict and WAI compli
PostById macro
Templatable macro for displaying a Post. This macro can be used in SQL Report Templates that search through posts.
Tested in 7.4.8-stable/7.4.10-stable.
process ( assetId, templateId )
assetId
The assetId of the Post.
IfFormParamValue
Macro for checking if a form param has a certain value or not.
getUri macro
Macro for getting the "complete url", properly named uri,
FileUrlById macro
Macro for returning the file system URL to a File or Image Asset, identified by it’s assetId.
#-------------------------------------------------------------------
process ( assetId, returnFileName )
returns the file system UR
checkRadio macro
With this macro you can display an arbitrary piece of text based on a submitted form variable on the previous page. This can be handy to set a radiobutton to 'selected' for example based on an earlier answer.
Macro for displaying an arbitrary p
addFormVars macro
This macro allows you to add variables to the url when an url already has variables.
As you might know you can add any key-value pair to an url and receive those variables as template variables in this form:
HTML filter macro
In response to djs' question if anybody had ever written a macro that can stip HTML from a template-variable.
Here it is: filter.pm.
I use it in the recovery template like this:
Macro Runner
Put macroRunner.pl into your WebGUI/sbin folder and then you can use it to run macros you've written from the command line. This can be very valuable for testing macros.
Use it like this:
cd /data/WebGUI/sbinScratch Macro
This macro allows a user to fetch a scratch value passed in from the URL and use it in content. Social Bookmarks Macro
Macro places box of link icons for popular social bookmarking sites in WebGUI. Includes del.icio.us, digg, reddit, facebook, and stumbleupon. Includes graphic files, easy installation.
This is very similar to the Digg macro I wrote in that it prefiDigg Macro
Places a Digg.com link (text or image) on your site that allows visitors to easily submit an asset to Digg or vote for it.
When the user arrives at Digg, the title and URL of your content will be pre-filled for them if this is a new submission.YUIDateChooser
Package WebGUI::Macro::YUIDateChooser
DESCRIPTION
Macro for displaying a YUI (http://developer.yahoo.com/yui/) popup calendar attached to an input tag as specified by input_field_name.
process ( [libs], input_field_name, [calendar title], ["optiAWS E-commerce System Macro
NAME
WebGUI::Macro::AWS_ItemLookup
DESCRIPTION
The AWS_ItemLookup macro uses Amazon E-Commerce Service to lookup book, music or other item details from the Amazon website using an ASIN (Amazon Standard Item Number). For books, the ASIN is the samFlash Movie Macro (youtube,google,myvideo,..)
Usage:
LastModifiedBy Macro
This macro will display the user who last modified the current asset. Optionally a string can be included in the macro call which will be pre-pended to the username.
For example:
Gravatar Macro
What is a Gravatar?
A gravatar, or globally recognized avatar, is quite simply an 80Flash Macro
You simply use this macro as follows:
Simply place the following code into your html:
^Flash("/images/yourFile.swf",200,30,"8,0,0,0","inputTxt=^D("%c %D, %y");");
What this allows you to do is add additional information/variables to the flash codSQLExt Macro
This macro allows you to query a database (internal or external) within the macro.
It is in raw form, and may need to be cleaned up a bit before someone who didn't know much about sql could be able to use it. It does work very well though as we useRecentPosts
NAME
ParentPageTitle
Macro for returning the parent page title for the current page. This will work the same as the RootTitle macro with the exception of the ability to pass in the asset ID for the "root" page which will be excluded.
RootUrl macro
The RootUrl macro returns the url of the root of the current
page.Karma Macro
Now you too can have a nifty karma display on your website, just
like on PlainBlack's.SingleSignOn Macro (webgui7)
UPDATE:GeoIP macro updates for 6.8 and 7.x
Summary:SQLExt - SQL macro for external databases (database links) version 7 compatible
This macro extends SQL.pm macro to execute query to an external
database. You can also execute not-returning query like delete, insert
and update.
It's forward compatible with SQL macro, so you can write something like this
^SQLExt("select count(*DateTime Macro
This WebGUI macro returns the date/time in the format, witch is configured in the current user profile. The input format is the unix date/time.
For installation read the contained installation instructions.
Download, more informations and see the Browser Macro
This WebGUI macro detects the current browser and returns it.
For installation read the contained installation instructions.
Download, more informations and see the macro in action, go to my homepage http://www.studio4master.ch/en/projects/browserPHP Macro
With this WebGUI macro, it is possible to include and run PHP scripts in WebGUI.
For installation read the contained installation instructions.
Download, more informations and see the macro in action, go to my homepage http://www.studio4masterPerl Macro
A WebGUI contribution (macro) to include and run perl code (scripts) in WebGUI.
For installation read the contained installation instructions.
For more informations, go to my homepage http://www.studio4master.ch/en/projects/perl-macro.
EnjoHTML_Entities
A WebGUI contribution (macro) to convert special characters to HTML code.
For installation read the contained installation instructions.
For more informations, go to my homepage http://www.studio4master.ch/en/projects/html-entities-macro.
EDateParse - A parsing and reformatting date/time
Current version: (2005-12-22)Introduction
This macro allows to parse a date/time string and to reformat it in a custom format.
I create this macro because I needed of showing the publication date of RSS article which are in format like this
11 De