_link is just a string, so you would have to parse it to extract the last 
three args. If there is no query string after the last arg, you could do:

_link.split('/')[-3:]

That will give you the last three segments of the URL in a list. If there 
is a query string, you would need to remove it (i.e., everything from the 
"?" on) from the last arg.

Anthony

On Tuesday, January 28, 2014 2:07:31 PM UTC-5, Annet wrote:
>
> I have the following line of code to generate a menu item:
>
>
> <a onclick="web2py_component('{{=_link}}', 'content'); {{if 
> request.args(1, cast=int) >= TIER2ID:}}; web2py_component('{{=URL('init', 
> 'handler', 'hero_image')}}', 'image') {{pass}}">{{=_name.replace('_', ' 
> ').capitalize()}}</a>
>
>
> _link has three args. Is it possible to access these args, I need them in 
> the second call to web2py_component.
>
>
> Kind regards,
>
> Annet
>

-- 
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/groups/opt_out.

Reply via email to