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

x
?
Solved

CFML cfif question

Posted on 2011-09-08
2
Medium Priority
?
280 Views
Last Modified: 2012-05-12
In my header.cfm (added to each page as an include) I have included some social buttons like fb,google +1, twitter. There is one page where I do not want these buttons included. is it possible to use some conditional processing like <cfif  url NEQ "the url i dont want buttons to show up">show my buttons <cfelse> </cfif>
0
Comment
Question by:Bang-O-Matic
2 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 2000 total points
ID: 36503076

the page name is stored in this variable...

 cgi.script_name  

that is everything after the .com/

So you could say...

<cfif listLast(cgi.script_name,"/\") is not "aboutus.cfm">
   .... do buttons...
</cfif>


That would not show on any aboutUs.cfm page regardless of the folder

 
0
 

Author Closing Comment

by:Bang-O-Matic
ID: 36503095
Perfect! Thanks
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

926 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