On Sunday, February 25, 2018 at 5:25:51 AM UTC-5, Annet wrote:
>
> Hi Joel,
>
> Thanks for your reply.
>
> This works:
>
> ('', False, A('TaC',
> _href='https://static.domain.com/files/Terms_and_Conditions.pdf',
> _target="_blank", vars=dict(attachment=True)))
>
> For some reason the first attribute is not used as the link text.
>
If the third element of the menu item is an HTML helper, it is used as the
menu item, and the first element is ignored. The third element can also be
a dictionary, in which case, the menu item becomes A(first_element,
**third_element). Finally, the first element can itself be an A() helper,
in which case the third element is ignored -- so you could instead do:
(A('TaC', _href='https://static.domain.com/files/Terms_and_Conditions.pdf',
_target="_blank", vars=dict(attachment=True)), False, None)
Anthony
--
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.