Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Creating an cfif to check if page is index

New Here ,
Mar 20, 2008 Mar 20, 2008
I'll firstly admit I'm pretty new to Coldfusion and have some programming knowledge in general so please be specific with any help.

I'm using CFWebstore and looking to customize my homepage layout. So I'm needing an if statement in the dsp_page.cfm that will display the output code in a new layout if it is the homepage, but default to the standard output if any other page.

So if I'm thinking correctly I'll want a

If page = homepage or index
then run this custom layout code,

else
run original without custom layout


I've got it to read the else, since it passes by my IF statement, so I really don't know how to check to see if it is on the homepage or not.

Thank you for any help!
353
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2008 Mar 20, 2008
Look at your cgi variables. There are a few that you can use to tell you what page you are running.

Hopefully the code you posted is in the onRequestStart() function of your application.cfc.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2008 Mar 24, 2008
LATEST
Hi

You can use CGI.SCRIPT_NAME to achive this.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources