Showing
2 changed files
with
2 additions
and
2 deletions
| @@ -124,7 +124,7 @@ module Kanjai | @@ -124,7 +124,7 @@ module Kanjai | ||
| 124 | elsif self.type_content == 'plugin' | 124 | elsif self.type_content == 'plugin' |
| 125 | "#{I18n.t('admin.content_types.plugin')}: #{controller_name}.#{action_name}" | 125 | "#{I18n.t('admin.content_types.plugin')}: #{controller_name}.#{action_name}" |
| 126 | else | 126 | else |
| 127 | - subpart = TemplatePart.find_by_code(self.type_content) | 127 | + subpart = page.page_template.template_parts.find_by_code(self.type_content) |
| 128 | subpart ? subpart.name : self.type_content | 128 | subpart ? subpart.name : self.type_content |
| 129 | end | 129 | end |
| 130 | end | 130 | end |