If I open page links or column header links of a grid into a new page (eg right click, Open in new Tab/Window) it works fine. If the grid is in a component, the page that opens has no formatting. It's opening just the component.
To simulate:
# model
db.define_table('item', Field('amount', 'integer'), migrate=True)
if db(db.item).count() == 0:
from gluon.contrib.populate import populate
populate(db.item, 100)
# controller (controllers/default.py)
def inner():
response.generic_patterns = ['html', 'load']
grid = SQLFORM.grid(db.item)
return locals()
def outer():
return dict()
# View (views/default/outer.html)
{{extend 'layout.html'}}
{{=LOAD(c='default', f='inner', extension='load', ajax=True)}}
View the inner page directly ((
http://my.domain.com/app/default/inner) and right click on the 'page 2' link and select 'Open in new Tab' and all is good. A page opens as expected on page 2.
View the outer page (
http://my.domain.com/app/default/outer) and it looks the same, everything works generally the same, except now when I right click on 'page 2' link and select 'Open in new Tab' the resultant page does not display properly. There is no html from layout.html, only the raw component is displayed.
Any ideas on how to prevent that?
Jim