solution for this ... now where is that snippet ... here it is ...
I'll just pop what i copied from that thread into here, and maybe it
helps ... courtesy of Julian ...
<cfparam name="self" default="#URLSessionFormat('index.cfm?=')#">
Hi Brent, yes that's the standard way of using it, but you've then got
to wrap it around every single url - a lot of extra code overall and
not so good if you change your mind about it later.
I've come up with a way of centralising it within the #self# variable
which seems to work, but wondered if anyone had anything better or
could see any flaws:
Obvious first thought was to wrap it round the initial "self" setting like so:
<cfparam name="self" default="#URLSessionFormat('index.cfm')#">
but when passing other URL parameters -
href="" - you'll end up with 2 question
marks if cookies are OFF (one added by CF for the session tokens, and
the one you've coded). Just changing the "?" to an "&" in your url is
no good if cookies are ON, 'coz you'll have no question mark at all.
Both result in errors.
Instead I've kept the change in my urls from "#self#?fuseaction..." to
"#self#&fuseaction..." , but added a question mark followed by a dummy
equals sign to the initial self variable like so:
<cfparam name="self" default="#URLSessionFormat('index.cfm?=')#">
If cookies are OFF, CF will just append the session token to #self#
with no extra ?.
If they're ON, you've got a ? after every "index.cfm" and the
fuseaction and any other parameters are also just appended.
It's a really useful new function and this seems to be a relatively
painless way of incorporating it into FB.
Julian.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

