Purpose
This is ONLY a sample, showing the QueryString, and the parameter "title" from it..
Details
Macro Name | show-querystring | ||||||||
---|---|---|---|---|---|---|---|---|---|
Macro-Title | Show Querystring | ||||||||
Description | This Macro shows part of the Querystring | ||||||||
Categories | Confluence Content | ||||||||
Documentation URL | http://www.mos-eisley.dk/x/EIDzAg | ||||||||
Definition of User Macro |
|
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