【发布时间】:2021-03-18 16:55:35
【问题描述】:
我在 Magnolia 5.7.9 中创建了一个新组件,在 /templates/components 中创建了 placeholder.ftl 和 placeholder.yaml,我可以在模块资源文件下正确看到它们。
placeholder.yaml:
title: Placeholder
renderType: freemarker
templateScript: /xxx-module-versioning/templates/components/placeholder.ftl
placeholder.ftl
<p>Hello World! I'm a Placeholder Component.</p>
当这个特定组件渲染时,它会给出一个渲染错误:info.magnolia.rendering.engine.RenderException: No template definition found for the current content
原因: info.magnolia.config.registry.Registry$NoSuchDefinitionException: /xxx-module-versioning/templates/components/placeholder.ftl 在 info.magnolia.config.registry.AbstractRegistry.getProvider(AbstractRegistry.java:136) ~[magnolia-configuration-5.7.9.jar:?]
此配置有什么我遗漏或做错了吗?
【问题讨论】:
标签: magnolia