Hi all, I've built a new CF_Param custom tag to be used in the place of CFPARAM. It does exactly the same thing, except you get to provide a "search list" of variable names. If one these variables exists, then its value will be used instaed of the default. Take a look on http://Bjork.net/taggallery/index.htm This has solved a problem I am always encountering, when building Custom Tags that expect certain request-scope variables to exist. Of course, over the eons, my naming conventions have changed, so the Custom Tag never knows exactly which request-scope variable is actually being used. No worries, with CF_Param, you can give the tag a list of possible names. I look forward to any comments, Thanks very much, Lee (Bjork) Borkman http://bjork.net ColdFusion Tags by Bjork ps., Here is the readme text, if you're interested: <CF_PARAM NAME="title" SEARCHLIST="request.title, request.page.title, request.app.title" DEFAULT="RTA Web" > Syntax: <CF_Param NAME="" SEARCHLIST="" DEFAULT=""> Description: Replaces CFPARAM tag. Has the same effect as CFPARAM, except it searches through a list of variable names first. If one of these variables exists, then the variable NAME is set to that value. Uses: Great for reconciling inconsistent naming conventions, especially useful for request-scope variables. Example: Say I am writing a Custom Tag to build a page header. The tag needs to know the width of the page. That info is normally stored in #request.page.width#, but in old applications was stored in #request.pagewidth# and #request.width#. A single call to CF_PARAM can set tyhe value of a new local "pagewidth" variable: <CF_PARAM NAME="pagewidth" SEARCHLIST="request.pagewidth, request.width, request.page.width" DEFAULT="575" > If CF_Param finds that any of "request.pagewidth, request.width, request.page.width" exist, then that value will be copied into pagewidth (unless pagewidth already exists). If none of these variables exist, then the default of 575 will be used. Author; Lee Bjork Borkman Bjork.Net - Cold Fusion Tags by Bjork IMPORTANT NOTICE: This e-mail and any attachment to it is intended only to be read or used by the named addressee. It is confidential and may contain legally privileged information. No confidentiality or privilege is waived or lost by any mistaken transmission to you. If you receive this e-mail in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or use any part of this e-mail if you are not the intended recipient. The RTA is not responsible for any unauthorised alterations to this e-mail or attachment to it. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
