Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Asp.net Hosting Plan security, reliable, stable 1 72
Apache SSL and mod_rewrite not working 8 123
SCCM vs Windows server 5 76
Stream live video from Raspberry Pi camera 22 116
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

16 Experts available now in Live!

Get 1:1 Help Now