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).

Anthony

On Wednesday, August 14, 2013 8:46:39 AM UTC-4, Annet wrote:
>
> Does it make any difference whether you do:
>
> {{if landingpage.heroShot:}}
>       {{include 'landingpage/hero_shot.html'}}
> {{pass}}
>
> and in the inlcuded view:
>
> <div class="row-fluid m-bot30">
>   <div class="span12">
>     <div class="hero-shot">
>       <img  src="{{=URL('static','img/landingpages/%s' 
> %landingpage.heroShot)}}" alt="" />
>     </div>
>   </div> <!-- /.span12-->
> </div> <!-- /.row-fluid -->
>
>
> or you do:
>
> {{include 'landingpage/hero_shot.html'}}
>
> and in the included view:
>
> {{if landingpage.heroShot:}}
> <div class="row-fluid m-bot30">
>   <div class="span12">
>     <div class="hero-shot">
>       <img  src="{{=URL('static','img/landingpages/%s' 
> %landingpage.heroShot)}}" alt="" />
>     </div>
>   </div> <!-- /.span12-->
> </div> <!-- /.row-fluid -->
> {{pass}}
>
>
> 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.


Reply via email to