Purpose

This is ONLY a sample, showing the QueryString, and the parameter "title" from it..

Details

Macro Name

show-querystring

Macro-TitleShow Querystring
DescriptionThis Macro shows part of the Querystring
CategoriesConfluence Content
Documentation URLhttp://www.mos-eisley.dk/x/EIDzAg

Definition of User Macro

(afkryds)No macro body
(fejl)Escaped
(fejl)Unrendered
(fejl)

Rendered

 

Macro Code

## @noparams
 
<b>Querystring:</b>$req.getQueryString
 
#set ($qString = $req.getQueryString())
#set ($titleStart = $qString.indexOf("title=")+6)
#set ($nextAmpIndex = $qString.indexOf("&",$titleStart))
#if ($nextAmpIndex == -1)
#set ($titleEnd = $qString.length())
#else
#set ($titleEnd = $nextAmpIndex)
#end
#set ($reqTitle = $qString.substring($titleStart, $titleEnd))
 
<b>Title:</b>$reqTitle