Thème Fakebook

Spoke too soon! I took a look and actually figured this out soon after I posted the above response. Sometimes writing things out can do that.

I’ve made an update so it’s just one template… by default in topic-list-item.js we have some code that looks like:

  renderTopicListItem() {
    const template = findRawTemplate("list/topic-list-item");
    if (template) {
      this.set("topicListItemContents", template(this).htmlSafe());
    }
  },

so if I override const template in the theme…

  renderTopicListItem() {
    const template = findRawTemplate("list/custom-topic-list-item");
    if (template) {
      this.set("topicListItemContents", template(this).htmlSafe());
    }
  },

This now points to a separate template, and since there’s no mobile counterpart by the same name… it also gets used for mobile. Thanks for inspiring the change with your question @hyd504!

4 « J'aime »