try LOAD component: http://www.web2py.com/books/default/chapter/29/12/components-and-plugins#LOAD
2015-07-10 10:24 GMT+03:00 PRACHI VAKHARIA <[email protected]>: > > > > > *GOAL* > > > - *AJAX — *controller/function is accessed via Ajax, update the div#ID > content only. (When a user clicks a link, a URL is generated and the > response is to be fetched using Ajax, and the relevant div#id is updated.) > - *DIRECT URL — *When the same controller/function is accessed via > Direct URL, load the page with Layout included. (When a user enters the > same URL in the address bar, the page must be returned with Layout.html > included.) > > > > *Layout.html* has the {{include}} inside the div#ID where Ajax places > the returned html content. > > > > Every *view* starts with the following 3 lines of code — to check if the > request is by Ajax or not, and extend Layout accordingly. (If Ajax, no > layout. If not Ajax, extend Layout.) > > *{{if not request.ajax:}}* > > *{{extend 'Layout.html'}}* > > *{{pass}}* > > > > > *PROBLEM* > When the page is loaded using Ajax, the part of Layout.html after the > {{include}} gets loaded again. So, 2 footers appear in the page. > > > *QUESTION* > > > - How to load the page by Ajax without loading the parts after the > {{include}} from Layout? > - How to load the same page by Direct URL by including the Layout.html? > > > > *Thank you, very much for reading this. And I hope someone can really > help. This problem is consuming me without any successful insights.* > > > Gratefully, > *PRACHI V* > > > > > _ > > > > > > -- > 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.

