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
We have three use cases for how a page is rendered:
Full page (regular render)
Embedded as an iframe (no header and footer, but includes stylesheet and scripts)
Fragment (just a HTML snippet, for when the app reloads part of a page)
We have implemented these cases in apps by overriding template blocks from special-case templates (such as embedlayout.html.jinja2 that inherits layout.html.jinja2 in hasgeek/hasjob#455). It will be easier to do this with direct support from Baseframe.
All Baseframe layout templates should recognise a baseframe_render variable passed to the template. Valid values are full, embed and fragment. Invalid values are interpreted as full.
All blocks in layout templates (baseframe.html.jinja2, layout.html.jinja2, formlayout.html.jinja2, etc) should have if conditions that skips rendering the block if a matching render condition is met.
Apps that override blocks with their own versions are responsible for honouring the baseframe_render variable. This will no longer be Baseframe's responsibility.
The if conditions should not remove template blocks, only their contents. A block containing a sub-block will need if conditions above and below the sub-block.
The text was updated successfully, but these errors were encountered:
We have three use cases for how a page is rendered:
We have implemented these cases in apps by overriding template blocks from special-case templates (such as
embedlayout.html.jinja2
that inheritslayout.html.jinja2
in hasgeek/hasjob#455). It will be easier to do this with direct support from Baseframe.All Baseframe layout templates should recognise a
baseframe_render
variable passed to the template. Valid values arefull
,embed
andfragment
. Invalid values are interpreted asfull
.All blocks in layout templates (
baseframe.html.jinja2
,layout.html.jinja2
,formlayout.html.jinja2
, etc) should haveif
conditions that skips rendering the block if a matching render condition is met.Apps that override blocks with their own versions are responsible for honouring the
baseframe_render
variable. This will no longer be Baseframe's responsibility.The
if
conditions should not remove template blocks, only their contents. A block containing a sub-block will needif
conditions above and below the sub-block.The text was updated successfully, but these errors were encountered: