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

Does CF parser include statement within if-statement

New Here ,
May 05, 2007 May 05, 2007

Copy link to clipboard

Copied

Hi,

I usually create small sites which have only couple of pages and I'm used to write all the code into single cfm-file with cfif url.area eq "foo" etc statements.

I was wondering that if I was to make a highly trafficed site, would it be better just to write each part to it's own cfm-file or does coldfusion ignore includes when they are inside cfif -> /cfif if the comparision doesnt fit?

I just don't want to parser 100k lines of code each time but still would like to keep them in "single" file.

Any other ways to do this would also be appreciated :)

- epo
TOPICS
Advanced techniques

Views

299

Translate

Translate

Report

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
Guest
May 06, 2007 May 06, 2007

Copy link to clipboard

Copied

The following is perfectly acceptable:

<CFIF foo IS TRUE>
<CFINCLUDE TEMPLATE="one.cfm">
<CFELSE>
<CFINCLUDE TEMPLATE="two.cfm">
</CFIF>

Votes

Translate

Translate

Report

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 ,
May 10, 2007 May 10, 2007

Copy link to clipboard

Copied

LATEST
Another option would be something like:

<cfinclude template = "#area#.cfm" />

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technology, Inc.
------------------------------------------------------------------
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/



"epo" <webforumsuser@macromedia.com> wrote in message
news:f1jfs9$nlc$1@forums.macromedia.com...
> Hi,
>
> I usually create small sites which have only couple of pages and I'm used
> to
> write all the code into single cfm-file with cfif url.area eq "foo" etc
> statements.
>
> I was wondering that if I was to make a highly trafficed site, would it be
> better just to write each part to it's own cfm-file or does coldfusion
> ignore
> includes when they are inside cfif -> /cfif if the comparision doesnt fit?
>
> I just don't want to parser 100k lines of code each time but still would
> like
> to keep them in "single" file.
>
> Any other ways to do this would also be appreciated :)
>
> - epo
>


Votes

Translate

Translate

Report

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
Documentation