Along these same lines:

response.menu += [
    (T('External Sites',), False, A('Web2Py', _href="http://web2py.com/",_target
="_blank"), []),
    ]


Gives the expected result of a new tab/window
However, the following loads the link in both the current tab/window as 
well as the new one.

response.menu += [
    (SPAN('External Sites', _class='highlighted'), False, '#', [
        ('', False, A('Web2Py', _href="http://web2py.com/";, _target="_blank"
),[]),
        ])
    ]


It looks like line #25 from web2py_bootstrap.js is forcing dropdowns to 
load in the current window regardless of any target.

jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this
).attr('href');});

I don't know js well enough to suggest a change. Am I at least looking in 
the right place?

On Monday, June 25, 2012 9:31:35 AM UTC-4, Anthony wrote:
>
> You can control exactly what goes inside the <li> for a given menu item by 
> making the third element of that item a web2py HTML helper instead of just 
> a URL. So, instead of:
>
> ('External Link', False, 'http://somesite.com')
>
> You can do:
>
> ('', False, A('External Link', _href='http://somesite.com', _target=
> '_blank'))
>
> Anthony
>
> On Monday, June 25, 2012 9:06:20 AM UTC-4, Manuele wrote:
>>
>> What if I want to put a voice in the menu that link a page external to 
>> my application that I want to open in a new tab? 
>>
>> thanks in advance 
>>
>>      Manuele 
>>
>>  

-- 



Reply via email to