I used $content.title to get the page title which has worked in a user macro but now I want to get only the first letter on a page title since my pages have more than one words e.g
I have a page titled AF | Afghanistan now I want to only get AF?
Hi Ian,
Here is an example of how you might get the first word (up until the first space character):
## @noparams#foreach ( $element in $content.title.split(" ") ) #set ( $firstWord = $element )#break #end$firstWord
@Stephen Deutsch Hurraaayyyy!!
Thanks alot.It has worked.
It looks like you're new here. Sign in or register to get started.