[ic] improving awkward IF syntax

Bob Ramstad interchange-users@interchange.redhat.com
Thu Dec 20 17:06:00 2001


   On Thu, Dec 20, 2001 at 12:33:31PM -0800, Bob Ramstad wrote:
   > Second question.  
   > 
   > (Again, I'm a digester, so if you send a response to the list and to
   > me directly, I'll be able to get this fixed faster.  Thanks in advance
   > for CCing me directly.  Yow.)
   > 
   > One of my goals is to make it so that all the content lives in the
   > database and is being served from flypage.html.  That's the way we've
   > got it architected on another system, and we'd like to keep it that
   > way.
   > 
   > I've added products::type and products::orderable as columns to the
   > products database.  type can be PAGE, ITEM or NIL.  orderable can be
   > YES or NO.  Using combinations of these settings, I can determine
   > exactly how to display the page.


   Christopher F. Miller wrote:

   You might be able to skip a lot of the logic if you use 
   PageSelectField.  Have you looked at that?

This is a really good suggestion.

Part of me would prefer to have one big ugly flypage with conditionals
built in so that I can make any look and feel changes in one location.
(Most of the changes are pretty minor between the different types.)

That said, it certainly would simplify things a lot to have each of
the different configurations have a separate "flypage" so debugging
would be greatly simplified.  I can probably break things down into
six or so cases, and even write a quick Perl script to populate a
column for the right flypage to use.  Hmmm.

I'm still interested in ways to make the ITL syntax cleaner, but this
suggestion is a good one.  Thanks!

-- Bob