it seems, the db/menu.py and views/layout.html must be match each other
when modified it (list length and list index).
never thought that the scaffolding menu can be modified too.
*e.g.*
*models/menu.py*
response.menu += [
(T('Home'), False, URL('default', 'index')*, T('Title'), 'a',* []),
thanks for the pointer, anthony
best regards,
stifan
--
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
On Wednesday, March 7, 2018 at 12:39:42 AM UTC-5, 黄祥 wrote:
>
> agree, so what is the best way to make a menu in web2py that can contain a
> href with it's attribute like accesskey and title?
>
Here's the code currently used in the layout to generate the menu from
response.menu:
https://github.
agree, so what is the best way to make a menu in web2py that can contain a
href with it's attribute like accesskey and title?
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com
The menu helper is staying but it is use is no longer recommended. People
have not found it useful and seems to confuse users when doing custom
layouts.
On Monday, 26 February 2018 20:50:24 UTC-6, 黄祥 wrote:
>
> no worries, since massimo plan to release new web2py version, is MENU()
> helper alr
no worries, since massimo plan to release new web2py version, is MENU()
helper already included in layout.html for the will coming version? or
should we use custom menu-generating code for the will coming version ?
thx n best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.co
On Monday, February 26, 2018 at 7:51:58 PM UTC-5, Anthony wrote:
>
> Here is web2py 2.16.1 with the 2.16.1 version of the welcome app on
> Pythonanywhere: https://w2ptest.pythonanywhere.com/test/default/index.
>
Oops, sorry, was using the older welcome app. The problem you are seeing is
that the
Here is web2py 2.16.1 with the 2.16.1 version of the welcome app on
Pythonanywhere: https://w2ptest.pythonanywhere.com/test/default/index.
What version of web2py are you running on Pythonanywhere?
Anthony
On Monday, February 26, 2018 at 6:35:46 PM UTC-5, 黄祥 wrote:
>
> 1. start from scratch down
1. start from scratch download web2py_src.zip from web2py.com in
mac:
2.16.1-stable+timestamp.2017.11.14.05.54.25
(Running on Rocket 1.2.6, Python 2.7.10)
and pythonanywhere:
(2.16.1-stable+timestamp.2017.11.14.05.54.25
(Running on Unknown, Python 2.7.6))
2. created new web2py app from admin
3. e
Sorry, I cannot reproduce that output. Using that menu in the default
welcome app, I get the following HTML output:
http://localhost:8000/test/master/address>">Address
http://localhost:8000/test/master/address>">Nonehttp://localhost:8000/test/master/address>">Blankhttp://localhost:8000/test/maste
*web2py version :*
2.16.1-stable+timestamp.2017.11.14.05.54.25
(Running on Rocket 1.2.6, Python 2.7.10)
*step to reproduce:*
1. create new web2py app
2. edit models/menu.py
response.menu = [
(T('Address'), False, URL('master', 'address'), [] ),
(A('None', _href='/test/master/address', _cl
Hi Anthony,
Thanks for your reply and explanation, I changed my code
to the code you provided.
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
On Sunday, February 25, 2018 at 7:57:22 PM UTC-5, 黄祥 wrote:
>
> @anthony, tested your code but the result is not expected, it's added
> another a href
> *usually use in response.menu :*
> (T('Address'), False, URL('master', 'address'), [] ),
> *result:*
> Address
>
> *change into :*
> (A('Address'
@anthony, tested your code but the result is not expected, it's added
another a href
*usually use in response.menu :*
(T('Address'), False, URL('master', 'address'), [] ),
*result:*
Address
*change into :*
(A('Address', _href='/test/master/address', _class='dropdown-item'), False,
*None*),
*resu
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 attri
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.
Kind regards,
Annet
--
Resources:
- http://w
don't use URL at all, just do:
('TaC', False, A('TaC',
_href='https://static.domain.com/files/Terms_and_Conditions.pdf',
_target="_blank", vars=dict(attachment=True)))
If it gives an error call the .xml() directly on A:
('TaC', False, A('TaC',
_href='https://static.domain.com/files/Terms_and_Co
I have the following link in a view:
{{=A('TaC',
_href='https://static.domain.com/files/Terms_and_Conditions.pdf',
_target="_blank", vars=dict(attachment=True))}}
I want to convert it to a menu item
('TaC', False, URL(???))
How do I convert the _href to a URL()
Kind regards
Annet
--
Reso
18 matches
Mail list logo