Last modified by Normann P. Nielsen on 2025/12/12 15:11

From version 1.1
edited by Normann P. Nielsen
on 2025/12/12 15:11
Change comment: There is no comment for this version
To version 2.1
edited by Normann P. Nielsen
on 2025/12/12 15:11
Change comment: There is no comment for this version

Summary

Details

Blog.BlogPostClass[0]
Is hidden
... ... @@ -1,0 +1,1 @@
1 +No
Publish date
... ... @@ -1,0 +1,1 @@
1 +2014-02-02 13:52:00.0
Is published
... ... @@ -1,0 +1,1 @@
1 +Yes
Category
... ... @@ -1,0 +1,1 @@
1 +News
Title
... ... @@ -1,0 +1,1 @@
1 +Confluence User Macro - Getting the Request string
Content
... ... @@ -1,0 +1,20 @@
1 +Fetched from [[https://confluence.atlassian.com/display/DOC/Include+Page+Macro]]
2 +
3 +
4 +
5 +
6 +{{code}}
7 +#set ($qString = $req.getQueryString())
8 +#set ($titleStart = $qString.indexOf("title=")+6)
9 +#set ($nextAmpIndex = $qString.indexOf("&",$titleStart))
10 +#if ($nextAmpIndex == -1)
11 +#set ($titleEnd = $qString.length())
12 +#else
13 +#set ($titleEnd = $nextAmpIndex)
14 +#end
15 +#set ($reqTitle = $qString.substring($titleStart, $titleEnd))
16 +{{/code}}
17 +
18 +
19 +
20 +Very nice for getting the params from a QueryString - I am thinking of making a "Show Image" page in the [[Mos-Eisley Gallery>>Main.atlassian.atlassian-confluence.mos-eisley-gallery]], using QueryString params