Hi all. I'm hoping someone can help out with this problem I've run into.

I'm trying to make our home grown CMS a bit easier to use for our
editors and easier to maintain. The issue at hand involves how we code
email addresses into the content. I have an even that pops up a new
contact window (CFwindow) and takes a Firstname and Lastname
parameter. From there when the form is filled out the model looks up
the email address based on the firstname/lastname combo and that all
works great. However, I now want to tweak the code just a bit and will
need to do some interesting find/replace work on the db side...which
isn't a huge deal but I'd rather avoid doing it again every time I
need to make changes.

My thought was to use a pseudo tag such as <email>Firstname
Lastname</email> which would be really easy for our editors to use and
I'd replace that pseudo tag at display time with the actual link to
the cfwindow. That works great in my mind, but I'm having a heck of a
time creating a RegEx that will do what I want.

In summary, anyone have any pointers as to which direction I should go
to turn this:

<email>Firstname Lastname</email>

into this:

<a 
href="javascript:ColdFusion.Window.create('staffContact#FirstName##Lastname#','Contact%20#Firstname#%20#Lastname#','/index.cfm?event=page.comment&firstname=#firstname#&lastname=#lastname#',{center:true,height:400,width:600,modal:false,closable:true,draggable:true,resizable:true,center:true,initshow:true,minheight:200,minwidth:200})">Email
#Firstname# #Lastname#</a>

Any thoughts would be much appreciated!

Thanks,
Jeremy

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305667
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to