Thank you both for your replies.
Try it out, but I believe those are equivalent. They should both result in
> the same parsing to Python code -- the hero_shot.html view will be parsed
> into Python in both cases, and the "if" statement will simply determine
> whether that code actually gets executed (so, if you compile the app, both
> should result in the same compiled view code).
>
So the code in landingpage/hero_shot.html is included anyway , I thought
that maybe in this case:
{{if landingpage.heroShot:}}
{{include 'landingpage/hero_shot.html'}}
{{pass}}
web2py doesn't bother to include the view, whereas in this case:
{{include 'landingpage/hero_shot.html'}}
it does include the view, just to find it's empty when there's no hero shot.
The landingpage/hero_shot.html is used in many layout views, that's the
reason why I
excluded it from the layout.
Kind regards,
Annet
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.