you can write two view.

1. view.html - direct request, extends layout.html
2. view.load - load via ajax. only requested information, not extends
layout or footer etc.


for example:

view.load

{{for i in range(0,9):}}
{{=i}}
{{pass}}



view.html

{{extend 'Layout.html'}}
 # other things
{{=LOAD('default','view.load',ajax=True)}}




2015-07-10 11:35 GMT+03:00 PRACHI VAKHARIA <[email protected]>:

>
>
>
> I have looked at the LOAD Component.
> But it seems that Load also might work as the Ajax case described above,
> unless you can suggest a way around it.
>
>
>
> *Q: How will the Load Component extend Layout.html only when requested
> directly? And not extend Layout.html when called via Ajax?*
>
> *The problem above is that, the Ajax call for View.html also loads the
> Footer sections from the Layout.html twice.*
>
>
>
> Thank you very much for the response. But if you can help to suggest a
> working solution, that would be awesome.
>
>
>
> *— PRACHI V —*
>
>
>
> On Friday, 10 July 2015 03:34:13 UTC-4, xmarx wrote:
>>
>> try LOAD component:
>> http://www.web2py.com/books/default/chapter/29/12/components-and-plugins#LOAD
>>
>  --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> 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/d/optout.
>



-- 
Selman Kocael
İsabet Yayınları

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to