Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

baseframe.html.jinja2 should honour a baseframe_render variable #193

Open
jace opened this issue Jun 21, 2018 · 0 comments
Open

baseframe.html.jinja2 should honour a baseframe_render variable #193

jace opened this issue Jun 21, 2018 · 0 comments
Assignees

Comments

@jace
Copy link
Member

jace commented Jun 21, 2018

We have three use cases for how a page is rendered:

  1. Full page (regular render)
  2. Embedded as an iframe (no header and footer, but includes stylesheet and scripts)
  3. 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.

  1. 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.

  2. 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.

  3. Apps that override blocks with their own versions are responsible for honouring the baseframe_render variable. This will no longer be Baseframe's responsibility.

  4. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants