Skip to content

Commit

Permalink
Merge pull request #1195 from plone/petschki-relateditems-customize-t…
Browse files Browse the repository at this point in the history
…emplates

Make `pat-relateditems`templates customizeable again via patternoptions
  • Loading branch information
petschki authored Jul 18, 2022
2 parents 3fda447 + 984a9a6 commit 7116abe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pat/relateditems/relateditems.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ export default Base.extend({
var template;
if (self.options[tpl + "TemplateSelector"]) {
template = $(self.options[tpl + "TemplateSelector"]).html();
if (!template) {
}
if (!template) {
if(self.options[tpl + "Template"]) {
template = self.options[tpl + "Template"];
} else {
template = self[tpl + "Template"];
}
} else {
template = self[tpl + "Template"];
}
// let's give all the options possible to the template generation
var options = $.extend(true, {}, self.options, item, {
Expand Down

0 comments on commit 7116abe

Please sign in to comment.