> Is it possible to execute CF code from within databased
> content? I have a
> UDF that does a redirect for certain pages in a
> content-managed site that I
> am building and there are "virtual" pages that need to
> redirect to
> hard-coded pages. So, I dump this UDF call into content
> management --
> #redirect('/album/')# which should redirect to that path.
> In the content
> management display piece, I have tried using
> #evaluate(page_content)# but
> that doesn't work. Is it possible to do this?
>  I'm using CFMX7.
>  Thanks
>  Pete

As long as the function redirect() is defined in the page,
evaluate(page_content) should work fine... You might want to omit the
# symbols around redirect(). If that doesn't work, there's an
undocumented trick:

#evaluate("'#page_content#'")#

If at all possible, I would instead store only "/album/" in the
database (maybe in a separate column) and use some other mechanism for
identifying these redirect pages. Plus this would make the actual
content (in this case the target of relocation or "/album/") just the
content and not a mix of content and code. Or in failing that, write
these to static pages the same as the pages receiving redirection.


s. isaac dealey     954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213250
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