Its just not necessary... In your case, you can put the if around the TR
since the condition for each TD within the TR is the same... thus redundant.


Mike

-----Original Message-----
From: Mickael [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 9:53 AM
To: CF-Talk
Subject: Re: Best Practices

Hi Mike,

I agree with your point on the clarity and I have no problem making
includes.  I was really wonder if there is a performance issue when I ask CF
to evaluate each CFIF or is that not really an issue?
  ----- Original Message -----
  From: Tangorre, Michael
  To: CF-Talk
  Sent: Wednesday, December 17, 2003 9:41 AM
  Subject: RE: Best Practices

  First off, since the conditions are the same for each TD, put one
condition
  around the TR and avoid that redundancy OR... I would create two separate
  files, and cfinclude the one you need.... although you would still need
the
  one condition to determine which to include. For sake of clarity I would
  recommend two files and one logic block to determine which to include.

  Mike

  -----Original Message-----
  From: Mickael [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 17, 2003 9:38 AM
  To: CF-Talk
  Subject: Best Practices

  Hello All,

  I have an app that seem to run very slow at time, I am looking for ways
that
  I may not be using CF efficiently.

  The app is in french and english, and is able user is able to switch back
  and forth from french to english.  I use a session variable for this.

  My code states is <cfif session.language eq 1>english text<cfelse>french
  text</cfif>

  Here a  piece of table

  <table border="1" cellspacing="0" cellpadding="1" bordercolor="000066"
  align="center">
    <tr>
      <td><cfif session.language eq 1>Issue #<cfelse>Demande #</cfif></td>
      <td><cfif session.language eq 1>User ID<cfelse>Identification de
  l'usager</cfif></td>
      <td><cfif session.language eq 1>Date Logged<cfelse>Date
  d'entrée</cfif></td>

  My question is, is is better to Have the whole english table under the
first
  if statement then then entire french table in else faster than what I am
  doing above.  I like the method above because I have essentially only one
  table to view the other way I would have two.

  I am looking for suggestion on how to optimize this.

  Thanks

  Mike
    _____
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to