Solved

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

Posted on 2006-07-17
3
192 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 200 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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now