I had the issue a couple of topics back with & showing up in the
address bar. Turns out it was my fault from something I had done
awhile ago I forgot about.
That said, I still had an issue that I think I've figured out and
might be a "fix" for 3.2. I put "fix" in quotes because I'm still not
100% sure the problem is not partially my imagination but if you
follow what's below I think you can recreate it and I think I have a
solution.
Two URLs - one made via event.linkto() and one using append in
redirect/do/append in modelglue,xml
As it stands now if a url is created via
<result name="mortgage" do="addmort" redirect="true"
append="propunitID" />
I get index.cfm?event=addmort&propunitID=7 in the address bar and all
is well.
If I use event.linkto() to make something like the below in a calendar
loop
<cfset stDailyLink.eventday = DateFormat(variables.displayDate, "YYYY-
MM-DD") />
<cfset xe_pcd = event.linkTo("pcalendarday", "eventday",
"",stDailyLink ) />
I get #xe_pcd# looks something like
index.cfm?event=pcalendarday&eventday=2011%2D08%2D29
for my anchor tags and html validators don't like it (they want
&).
If, however, I change the "add values" section of URLManager.cfc to
<!--- Add values --->
<cfloop list="#arguments.append#" index="i">
<cfif isStruct(arguments.preferredContext) and
structKeyExists(arguments.preferredContext, i)>
<cfset link = link &
"&#i#=#urlEncodedFormat(arguments.preferredContext[i])#" />
<cfelse>
<cfset link = link &
"&#i#=#urlEncodedFormat(arguments.eventContext.getValue(i))#" />
</cfif>
</cfloop>
I still get proper links with redirect/do/append AND I get proper
values for vars created with event.link() used in anchors like
index.cfm?event=pcalendarday&eventday=2011%2D08%2D29
The change I made to <Add Values> is the amp; to the "true" portion of
the IF statement. Seems the "else" is used for append and "true" used
for event.linkto()?
Anyway, if the above is too scattered I can probably make a little
test page to show this better.
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en