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

Refactor index.mako to have a base template #18

Open
JaimieMurdock opened this issue Jul 23, 2016 · 0 comments
Open

Refactor index.mako to have a base template #18

JaimieMurdock opened this issue Jul 23, 2016 · 0 comments

Comments

@JaimieMurdock
Copy link
Member

Right now the template files aren't actually using a templating engine. They need to have a master template that has the nav bar and <html>, <head> and <body> elements embedded. This will reduce the file size of each template.

A good example of templates in action is the inpho/inphosite project. Two good files are the base-nosidebar.html and index.html.

base-nosidebar.html specifies the shell of each page at [https://inpho.cogs.indiana.edu/]. The call to ${next.body()} replaces the inner content with the page that inherits from this template. This is at the top of index.html as <%inherit file="/base-nosidebar.html"/>.

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

1 participant