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

Dynamic header navigation #201

Open
ndelangen opened this issue Feb 14, 2016 · 1 comment
Open

Dynamic header navigation #201

ndelangen opened this issue Feb 14, 2016 · 1 comment

Comments

@ndelangen
Copy link
Member

Right now in order to display navigation items, you have to override header.inc.html entirely.

Wouldn't it be nice to create a way to inject navigation items to render in the header without overriding the template?

I guess many people need custom branding and override the header anyway, but even then, a list of navigation-items in options.js, that gets rendered inside the template sounds like a sane thing to do.

I've created this feature, looking for feedback before submitting a pull-request.
ndelangen@1a4165c

@robhrt7
Copy link
Member

robhrt7 commented Feb 16, 2016

Hi,

That's a nice idea, it would fit nicely here. This will allow to keep more standard templates in userland, enabling easier maintenance in future.

As I stated in yesterdays discussion about breadcrumbs #200, it's better to separate templates and fill in the tags with already rendered HTML. It means that you can decompose whole <nav class="source_header_nav"> to another EJS template, which will be (again) configurable through views settings - https://github.com/sourcejs/Source/blob/master/options.js#L92.

Few comments before you do a PR - please don't change the formating of source files and add some docs about the header configuration, probably a new page in /docs will be the best approach.

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