Hi there
Wondering If anyone could assist
I have a handler which contains the following exithandlers...(i have
stripped out some of the code in the handler as its not totally
neccessary for the explanation)
<cffunction name="home">
<cfset artist = createObject
('component',"myapp.model.mdl_artists")>
<cfset rc.qryArtist = artist.getArtData(nameArt=rc.name_art)>
<!---Set View--->
<cfset EVENT.setView ("a/home")>
<!---Exit Handlers--->
<cfset rc.xh={artBio='artist.bio',
artFans='artist.fans'}>
</cffunction>
In the view for this function I create links for artists like this
<cfoutput query="rc. qryArtist ">
<p><a href="#event.buildLink(rc.xh.artBio/
#nameArtist#/">#nameArtist#</a> </p>
</cfoutput>
This produces a link for all the different artists outputted from the
query..
For example...../artist/bio/radiohead
..../artist/bio/boards of canada
The thing is that with the artist names that contain white space the
url looks like this...
artist/bio/boards%20of%20canada
And I would rather it looked like this
artist/bio/boards+of+canada
I know that this can be resolved by changing my code to
<cfoutput query="rc. qryArtist ">
<p><a href="#event.buildLink(rc.xhBio/##replace(nameArtist, " ", "+",
"ALL")#">#nameArtist#</a> </p>
</cfoutput>
But wondered if coldbox had any better way of achieving this?
Many thanks