Hi Folks, here is an idea, will it work ?
I always meant to ask, if I can perform string-operations on the page titel in usermacros.
The pagetile says "Introduction (Version 1.0)"
The pagebody says something like
h2. Introduction This is the introduction to the page .....
Now my question : Could I write a usermacro, that takes "Introduction (Version 1.0)" and does something like
h2. {left($pagetitle,pos($pagetitle,"("))}
So basically to cut off anything from "(" onward ?
Regards, Josch
Yes you can do this .... here is an example usermacro code
## @noparams #set($charIndexToSlice = $content.title.indexOf("(") ) #set($charIndexToSlice = $charIndexToSlice - 1 ) #if($charIndexToSlice > -1) $content.title.substring(0,$charIndexToSlice ) #end
Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!
Help us plant more trees
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.