Solved

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

Posted on 2006-07-17
3
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
tomcat7  URL keeps resolving to https instead of HTTP 4 73
Forbidden errors 5 156
Use System DSN 6 91
WAMP server installation, getting error popups, DLLs missing 5 84
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…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 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