You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of expected behavior and the observed behavior
When main of a Template is a List I would expect to be able to prepend items to the list.
I need this functionality to enable a work flow where every application in our site automatically gets wrapped with a generic header (=Card with title, info and links). So we would develop our application via a Template and fill in main. But then we would prepend the info header automatically
Complete, minimal, self-contained example code that reproduces the issue
import panel as pn
def _create_app():
view = pn.pane.Markdown("App View")
app=pn.template.MaterialTemplate()
app.main[:]=[view] # There might be a list of elements
# Something done automatically for all apps in the site
info_card = pn.pane.Markdown("Info Card")
app.main.insert(0, info_card)
return app
def test_app():
app = _create_app()
main_items = [item[0] for item in app._render_items.values() if "main" in item[1]]
assert main_items[0].object=="Info Card"
assert main_items[1].object=="App View"
if __name__.startswith("bokeh"):
_create_app().servable()
ALL software version info
Panel 0.10.1
Description of expected behavior and the observed behavior
When
main
of a Template is a List I would expect to be able to prepend items to the list.I need this functionality to enable a work flow where every application in our site automatically gets wrapped with a generic header (=Card with title, info and links). So we would develop our application via a Template and fill in main. But then we would prepend the info header automatically
Complete, minimal, self-contained example code that reproduces the issue
Screenshots or screencasts of the bug in action
python -m panel serve 'scripts\issue_render_items.py' --dev
`pytest 'scripts\issue_render_items.py'
The text was updated successfully, but these errors were encountered: