Ooops! You're right, of course. OK, I just fiddled some and found:

$if post_type == 'img':
                                <legend>Galleries</legend>
\
$if post_type == 'pdf':
                                <legend>Portfolios</legend>
\
$if post_type != 'img' and post_type != 'pdf':
                                <legend>Other</legend>

Always displays "Other". However, if I change it to:

$if (post_type != 'img') and (post_type != 'pdf'):

I get the expected behaviour that shows "other" in any case but 'img'
and 'pdf'. Is that normal?

On Sep 7, 4:45 pm, Adam Atlas <[EMAIL PROTECTED]> wrote:
> On 7 Sep 2007, at 18:41, [EMAIL PROTECTED] wrote:
>
> > $if not (post_type == 'image' and post_type == 'pdf'):
>
> Well, there's your problem. (post_type == 'image' and post_type ==
> 'pdf') is always False (because it can never equal both), so its
> negation is always true.
>
> What are you actually trying to do here?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to