Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Cleaning up old conditional code, how to condense this .....

Posted on 2006-07-17
3
Medium Priority
?
204 Views
Last Modified: 2013-12-24
Hello experts.  What's the most efficient way to re-write these "if statements"?
Thanks for your help,
K


<cfif CF_TEMPLATE_PATH EQ "D:\DIR1\DIR2\index.cfm" OR CF_TEMPLATE_PATH EQ "D:\DIR3\DIR4\index.cfm">
    <cfif NOT StructKeyExists(URL,"sectionID") AND NOT StructKeyExists(URL,"contentID") AND NOT StructKeyExists(URL,"ID")>
       DO SOMETHING
     <cfelse>
      DO SOMETHING ELSE
     </cfif>
</cfif>
0
Comment
Question by:whaleyk
3 Comments
 
LVL 18

Accepted Solution

by:
Plucka earned 800 total points
ID: 17126773
whaleyk,

<cfif find(cf_template_path, "index.cfm") and not isDefined("url.sectionID") and not isDefined("url.contentID") and not isDefined("url.ID")>
    DO SOMETHING
<cfelse>
    DO SOMETHING ELSE
</cfif>

Regards
Plucka
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question