Skip to content

Customize templates using EJS exclusively. #233

Description

@ndelangen

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions