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

Customize templates using EJS exclusively. #233

Open
ndelangen opened this issue Jun 16, 2016 · 3 comments
Open

Customize templates using EJS exclusively. #233

ndelangen opened this issue Jun 16, 2016 · 3 comments
Milestone

Comments

@ndelangen
Copy link
Member

In Core we should try to unify where templates are and how they can be overridden.

Currently this is how a user must override the 'Navigation markup' (at least according to the docs):

module.exports = {
  core: { ... },
  assets: {
    ...
    moduleOptions: {
      globalNav: {
        templates: {
          catalogHeader: _.template('<h2 class="custom-class">&lt;%= catalogMeta.title %&gt;</h2>'),
        }
      }
    }
  }
}

It should be a possible to just drop a .ejs file in some folder.

This brings me to the second example where we should unify our interface:

/core/views/ contain .ejs files
/assets/templates/ contain .html files (with ejs bindings)

I suggest we move all html-like files to a folder named /core/templates/.

We can group certain templates together, for example all page-templates can go into /core/templates/page/. etc.

@robhrt7
Copy link
Member

robhrt7 commented Jun 18, 2016

Moving page navigation generation to server side, the /core/views/ will be the natural choice for the templates, where it could be overridden with an existing approach.

@ndelangen
Copy link
Member Author

0.7 milestone?

@robhrt7
Copy link
Member

robhrt7 commented Jun 19, 2016

Yeah, closer to that.

@robhrt7 robhrt7 added this to the 0.7.0 milestone Jun 19, 2016
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