In one or both of the controllers:

    response.view = 'default/my_shared_view.html'

Or create two separate views that contain only the following:

{{include 'default/my_shared_view.html'}}

Anthony

On Sunday, February 21, 2016 at 5:09:33 PM UTC-5, Ron Chatterjee wrote:
>
> Any other way to do this without using LOAD?
>
> I have two controller using the same view pretty much idential html:
>
> def show_project():
>     projects = []
>     projects = db().select(db.Project.ALL, orderby = 
> db.Project.created_on, limitby=(0,100))
>     return dict(projects = projects)
>
> def projects_by_clicks()::
>         projects = db(db.Project.Terms.contains(project_term)).select()
>     return dict(projects = projects)
>
> How to use the same view for multiple controller?
>
> On Wednesday, January 12, 2011 at 8:23:10 AM UTC-5, Mirek Zvolský wrote:
>>
>> > I am wondering whether it is possible to show multiple controller's 
>> views... 
>>
>> Inside the controller code you can change to other view: 
>> if something: 
>>     response.view='xxx.html' 
>>
>> In the view itself you can have more named parts. 
>> In such case the extended layout has not only one {{include}} command, 
>> but more {{include xxx}} commands /I don't remember the syntax 
>> exactly/. 
>> Inside such partial views you can control use of that html part by 
>> {{if something:}} Output html here {{pass}} 
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to