This is not working for me. Even if I tried to add empty head contribution tag with dummy values, it does not render.
Can you please suggest something for this?
First as you define a category in your headContributions i would add this category to your headContribution so <@hst.headContribution keyHint=“demo” category=“htmlHead”>.
And second it was mentioned in a recent post [1] that headContribution accepts a single element. So wrap each meta tag you want to contribute in <@hst.headContribution tags
Thanks for your quick reply guys. But I had tried with setting the category attribute and also setting the each meta property in individual head contribution. This not helped me.
technically you don’t need xhtml=true, but it probably can’t hurt.
However, you should have access to your document in your root component. Either set the content document on the request in your base component or you should be able to do
Thanks for the reply Jasper.
I will be able to access the dynamic things from my content. As I have included the tag library in the both FTLs and particular dependancies at pom.xml, this should work.
But the problem I am having is that freemarker template engine is not executing the head contribution tag.
For example, I am trying with dummy values as below, this is also not working.
At test.ftl
<@hst.headContribution keyHint=“demo” category=“htmlHead”> abcd </@hst.headContribution >
At root.ftl
<@hst.headContributions categoryIncludes=“htmlHead” keyHint=“demo”/>