That is def v cool mark, I had never even thought of doing that :-) 

-----Original Message-----
From: Mark A Kruger [mailto:[EMAIL PROTECTED] 
Sent: 10 May 2006 18:28
To: CF-Talk
Subject: RE: URL Structure

Tuan,

I'm not sure what you are trying to do, but here's a trick that allows you
to manipulate links after the facts, as long as they are inside of "<a/>
tags. 

Let's say your user put in "<a href="http://blah.com?name=joe J. Smith">Joe
J. Smith</a>. What you want to appear is actually 

<a href="http://blah.cfm?nameJoe%20J%2E%20Smith";>Joe J. Smith</a>

But you do not want the user to encode it him or herself and you do not what
to allow them to do something like "#urlencodedformat("joe j. smith")#"

Here's a simple way to do that.

On the page that is being served (presumably a CFM Page). Add the following:

<cfimport taglib="htm" prefix=""/> 

Then, create a folder called "htm" that branches from that same directory
(where the page is being served).  Inside that folder place a file titled
"a.cfm" that can rewrite it for you.  The result is that CF treats a call to
<a> as if it were a call to the custom tags. The interior attributes become
attributes of the tag.  You could even enforce a URL handler to track clicks
or whatever. You could do the same with the "<form> tag, <div> tag..
Whatever....

I have a good sample on my blog:

http://mkruger.cfwebtools.com/index.cfm/2006/5/10/adaptive.tags





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240117
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to