How to detect the current .cfm.

When the user is "index.cfm", how can I write a cfif tag to detect this?

Basically I want my navigation menu to look different depending on the location of the user course I could simply change the CSS of the menu for each page, but I use cfinclude to place the menu around the site, so there is only 1 version of the menu.

Thank you!

Without knowing the bigger picture of your web app, here are some places/ways to determine the current page:

If you use Application.cfc, the current page is passed as a parameter to the onRequestStart method. The setting is called "targetPage" by default (but I imagine you could change this) and it contains the path of the web root access to the page that is called. If the called page is www.mydomain.com/index.cfm, the value of this parameter would be "index.cfm".

Example:

You can also use CGI variables on any CML page in your application to get the name of the page. Many variables in the CGI scope, script_name is probably the best to use.

Example:

I hope that the above will get you started. Good luck and have fun!

Tags: ColdFusion

Similar Questions

  • How to detect the current page

    How can I undergo certain cfif conditions to detect the current page?

    < cfif? Page1.cfm IS > abc
    < cfelseif? Page2.cfm IS > def
    < cfelseif? Page3.cfm IS > IAD
    < cfelse > jkl
    < / cfif >

    Use the cgi variables...
    Try using to see who is available.
    GL, Mike

  • How to access the current profile

    Hello

    Can someone guide me how can I detect the current profile in the BB device and get its information? To be more specific I want to be able to react to an event according to the current profile. For example, I want to play the current ringtone every day at 12:00 or if the device is vibration mode I want to vibrate!

    Is this possible? How?

    Thanks in advance.

    Discuss a question on the selection of a file to read here

    Therefore, there is no elegant way to call the embedded browser to select a file.

    Instead look at fileexplorerdemo that comes with JDE samples and implement your own features to select a file that must be read.

    Smart phone BlackBerry has two types of memory. Internal memory and microSD card memory.

    You can store ringtones in the memory of the device and to the memory of the micro-sd card. And you can assign a ringtone to a contact in the memory of the device and micro-sd card.

    Ringtones on microsd card folder: BlackBerry/ringtones

    Folder of the ringtones in the device memory: host/user/ringtones

  • How to detect the window closing event and to do some tasks before leaving

    Hello

    Someone knows how to detect the window closing event and to do some tasks before leaving?

    Sridhar

    Structure of the event allows to detect the window closing event. In the structure of the event,.

    Select this VI-> close round table for this task. See attached picture.

  • How to detect the sign of a number?

    I output which gives the number of negative or positive. My problem is how to detect the sign of the Boolean number and output? For example if the input number is negative as - 23.11 I want to output the value false and if the number is positive as 17.99 I want to output true.

    T H A N K S!

    Test if the number is greater than or equal zero.

  • Lost admin password, how to retrieve the current password to change it?

    I forgot my Admin password, I connect on my laptop using the scanner print finger all the time and when I try to change the password for Admin it ask the password which I do not remember. How to retrieve the current password and change it in Windows 7 Home premium?

    It's a laptop Acer 5738 G

    You can change your current password as follows:

    1. click on start.
    2. type the three letters cmd in the search box.
    3. press on Ctrl + Shift + Enter
    4. click on "run as Administrator".
    5. type the following command and press ENTER after each:
    NET user "user %%nom" 123456

    Now the password is 123456. While dealing with accounts and passwords: having a single admin account on a PC is about the same as having a unique key for your car. What happens if you lose? He lost? Break it? A robust Windows Setup requires at least the following:

    • Two admin accounts fully tested, with their passwords to record on paper.
    • A password key file. Click Start / Help, then search for help on "password". Follow the instructions to create a key on your USB flash drive file so that you'll never find yourself in this uncomfortable situation.
  • How to get the current timestamp in C++ to the BB10 project

    Please help me how to get the current timestamp in C++. Thanks for your help!

    Following your suggestion,

    QTime is only for a day.  http://developer.BlackBerry.com/Cascades/reference/QTime.html#details

    I found "QDateTime" of references of the API: http://developer.blackberry.com/cascades/reference/qdatetime.html#toTime_t

    QDateTime = now QDateTime::currentDateTime();
    timestamp long = now.toTime_t ();

    But I got an error. I searched but no results are clear:

    -variable 'QDateTime now' initializer has but
    incomplete type
    -type incomplete "QDateTime" used in the nested name
    specifier of

    I am a newbie. So thank you for your help

  • How to detect the key ALT pressed in os7

    Hai,

    How to detect the key ALT pressed in Os7...

    Can I use the source for os 7 as below? ,

    protected boolean keyStatus (int keycode final, time final int) {}

    If (Keypad.key (keycode) == Keypad.KEY_ALT) {}

    ...

    Returns true;

    } else

    Return super.keyStatus (keycode, time);

    }

    and also I want to know which is the return of this method? In detail
    How to detect the other touches also?
    What are the updations or changes in the code, on os6 os7?

    KeyCode is a bit model, if you use "is" to compare you won't get accurate results, you should use the operator '& '.

    See
    http://supportforums.BlackBerry.com/T5/Java-development/detect-ALT-and-shift-key-clicks/Ta-p/444976

  • How to get the current wording of the BlackBerry device with the BlackBerry App?

    Hello!

    I'm new to BlackBerry,

    Can u tell me pls, how to get the current language of the device using the program...

    PLS, suggest me...

    Locale.getDefaultForSystem () will give you the regional settings currently selected.

  • How to set the current date in the datetimepicker in qml?

    Hello

    Can I know how to set the current date in the DateTimePicker in QML?

     DateTimePicker {
                        id: datePicker
                        mode: DateTimePickerMode.Date
                        title: "Date"
                        value: "2013-11-20"
                        maximum: "2013-11-20"
                    }
    
    Container {
        DateTimePicker {
            id: picker5
            title: "DateTimeQml"
            mode: DateTimePickerMode.DateTime
            value: { new Date(); }
        }
    }
    
  • How to detect the runtime location?

    Hello

    In our application, we want to detect the current location at run time. ?

    You people can suggest me some excerpts from code or some references or article that can help me to do this. ?

    Thanks in advance and keenly awaiting response.

    Kind regards

    Narendra.

    This document explains the greater part of what you need to know.  You will find all documents for the JDE, I made you to version 4.6:

    GPS and BlackBerry Maps Development Guide

    http://docs.BlackBerry.com/en/developers/deliverables/3803/GPS%20and%20BlackBerry%20Maps%20Developme...

    You will find also these two useful videos:

    Introduction to GPS and BlackBerry

    http://www.BlackBerry.com/DevMediaLibrary/view.do?name=GPSOverview

    Advanced GPS techniques

    http://www.BlackBerry.com/DevMediaLibrary/view.do?name=GPSAdvanced

  • BI Layout Editor - how to display the current date?

    Hello

    Recently used BI Layout Editor (previously using MS Word to create the presentation of the State).

    He seems really nice and easy to use.

    However quick Q - How to display the current date in the layout editor (to show the report run date).

    Any quick suggestions is appreciated.

    Thank you

    Vivek

    Tab displays your selection available.

    It's like how when you insert the table in the Word document and when you select the table, you would see 2 additional tabs such as the design and the tool.

    Can you please insert "Text Element" and select the text element and see if you go to the tab 'text '?

  • I have Adobe Photoshop version 12.0.4x64 - how updated to the current version?

    I have Adobe Photoshop version 12.0.4x64 - how updated to the current version?

    Beginning of the updates here and product selection, read to see if you need to install updates in the order of the numbers, or if updates are cumulative for the product http://www.adobe.com/downloads/updates/

  • How to mark the current line in the grid forms

    How to mark the current line in the grid of forms in forms

    There is no grid in use in forms
    However, you were using the ORACLE spreadsheet in the OCX element before 10g in forms5.
    You can use the property of coloring of the ORACLE worksheet if you use older forms.

    If you speak the text displayed in the instances multile means with more display records. then you can use the Visual Attirbute
    and may affect the block attribute in current folder to the Visual attribute you make now.

  • How to detect the number of created quickobjects

    How to detect the number of quickobjects created? quickobject are quickbox2d.

    Basically, I have a timer that will countdown to 4 seconds and it will create a falling ball, it will get removed when she falls down. However, I want only there so that if more than 5 bullets are in step, it will cease to create until it is less than 5 to start creating some balls again. Is there a way I can do?

    It's the timer to create the ball

    If (! _ballCreation_timer) {}

    _ballCreation_timer = new timer (4000);

    _ballCreation_timer.addEventListener (TimerEvent.TIMER, _onBallCreationTimer);

    }

    _ballCreation_timer. Start();

    Function which create the ball based on clock

    function _onBallCreationTimer (e:TimerEvent): void {}

    _doCreateNewBall();

    }

    function _doCreateNewBall() {}

    _ball_quickobject = sim.addCircle ({x: PHYSICS_SCALE * (960), y: PHYSICS_SCALE * (10), RADIUS: 0.5, draggable: false});

    MAKE A LIST OF BALLS

    _balls_array.push (_ball_quickobject);

    }

    This is the part where if the table (QuickObject) ball falls down and are destroyed

    addEventListener (Event.ENTER_FRAME, _onEnterFrame);

    DRAW EACH BALL FALLING OUT OF THE SCREEN

    function _onEnterFrame (aEvent: Event): void {}

    for each (var quickObject: QuickObject in _balls_array) {}

    BALL FALLING OUT OF THE SCREEN?

    If (quickObject.y / PHYSICS_SCALE > 1080) {}

    _doHandleBallOffScreen (quickObject);

    }

    }

    }

    DESTROY THE BALL FALL OFF THE SCREEN IF

    function _doHandleBallOffScreen (aQuickObject: QuickObject): void {}

    DESTROY THE OBJECT

    aQuickObject.destroy ();

    REMOVE FROM THE CUSTOM TABLE

    _balls_array.splice (_balls_array.indexOf (aQuickObject), 1);

    }

    check the length of _balls_array.  If it is greater than 5, do not create another bullet:

    If (! _ballCreation_timer) {}

    _ballCreation_timer = new timer (4000);

    _ballCreation_timer.addEventListener (IMER TimerEvent.T, _onBallCreationTimer);

    }

    _ballCreation_timer. Start();

    Function which create the ball based on clock

    function _onBallCreationTimer (e:TimerEvent): void {}

    _doCreateNewBall();

    }

    function _doCreateNewBall() {}

    If (_balls_array.length<>

    _ball_quickobject = sim.addCircle ({x: PHYSICS_SCALE * (960), y: PHYSICS_SCALE * (10), RADIUS: 0.5, draggable: false});

    MAKE A LIST OF BALLS

    _balls_array.push (_ball_quickobject);

    }

    }

    This is the part where if the table (QuickObject) ball falls down and are destroyed

    addEventListener (Event.ENTER_FRAME, _onEnterFrame);

    DRAW EACH BALL FALLING OUT OF THE SCREEN

    function _onEnterFrame (aEvent: Event): void {}

    for each (var quickObject: QuickObject in _balls_array) {}

    BALL FALLING OUT OF THE SCREEN?

    If (quickObject.y / PHYSICS_SCALE > 1080) {}

    _doHandleBallOffScreen (quickObject);

    }

    }

    }

    DESTROY THE BALL FALL OFF THE SCREEN IF

    function _doHandleBallOffScreen (aQuickObject: QuickObject): void {}

    DESTROY THE OBJECT

    aQuickObject.destroy ();

    REMOVE FROM THE CUSTOM TABLE

    _balls_array.splice (_balls_array.indexOf (aQuickObject), 1);

    }

Maybe you are looking for

  • How to connect to the internet with no phone service

    I cancelled the phone service to my iphone 4 and now try to erase all content and settings but it rises as unable to join the network.  My network is fine as I use it on my new phone.  How can I get this phone to connect to the wi - fi so it will era

  • HP envy 4500: hp envy 4500 printer cable

    I just bought this printer. I was originally a printer needs to be connected, but there, everything seems to be wireless. I have wireless in my office. I understand that I can connect it to my laptop with a cord. I'm looking for what type of cord.  T

  • Windows live sign security for family problems

    Today, I installed Windows Live parental controls on my Windows 7 computer.  Whenever I tried to connect I not was able to do. I tried connecting to my "Hotmail" account and was able to do it without any difficulty. Whenever I am try to connect, I ge

  • BlackBerry Smartphones how can I remove my "BOLD" BB all the pictures and videos I took?

    I have a BB Bold 9900/9930. Memory appears full, does not let me take more photos or videos. I already backed up all my pictures and videos on my laptop. Now, I want - easily! -delete all photos and videos from my BB. How can I do this simply? I've b

  • format windows 8

    Hello Two years ago, I bought a computer with windows 8 pre installed so I don't have any produckt key. After, I'm going to windows 8.1 free windows store, well. now, if I want to restore my computer settings I recover windows 8, in order to get wind