Skip to content

Customize templates using EJS exclusively. #233

Open
@ndelangen

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.

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