The only function you can call via URL is the Z function. Once in the Z
function, you need logic to set the appropriate view file and return the
appropriate data. You can add request args to control that logic (e.g.,
perhaps the first or second arg could be "home", "A", or "B", with the
logic taking the appropriate action depending on the value of that arg). I
don't think it makes sense to have the nested functions, though (at least
not just for setting the view file).
Anthony
On Friday, November 30, 2012 3:33:40 PM UTC-5, Don_X wrote:
>
> The question in this post may not be very explicit .. but it is the best
> way for me to say it !
> I have the following problem :
> in my controller, I have a function ( Z ) that has its own view ( an html
> file - Z.html )
>
> the function Z is for registered members and uses the request arg to
> identify which user
>
> in the view ( the Z.html ), I have menu links ( home, A, B etc .. )
> related to the user ( initially passed as args )
> the view pages of these links ( home, A, B ... ) extends a portion of the
> Z.html file so they get to have their own views ( for the same user )
>
> the z function in the controller profile.py goes like this :
>
>
> def Z():
> if int(request.args(0)) == auth.user_id:
> return dict (membr=auth.user)
> else :
> for row in db(db.auth_user.id ==
> db.auth_user(request.args(0))).select():
> membr = row
> return dict(membr=membr)
>
> def home():
> response.view = 'profile/home.html'
> return dict(membr=membr)
>
> def A():
> response.view = 'profile/A.html'
> return dict(membr=membr)
>
> def B():
> response.view = 'profile/B.html'
> return dict(membr=membr)
>
>
>
>
> how would you call the URL for the function of the Z function ? .. like
> the home for example ? ... to get its view page ??? ..
>
> <a href="{{=URL('profile','Z ????? ....... }}
>
> I was previously using tabs for the user menus to view the menu item pages
> .... it worked fine ... !
> I am using this approach to avoid to much load calls in my view
>
> can someone help please ...
>
> thx
>
> Don
>
>
>
--