Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: TemplateContextContributor invoked multiple times
Hi there,
I've got a TemplateContextContributor component with
and I just realized it is invoked several times during the page load. I guess once for each component in the page.
Why is this happening? If contextContributor is only for the theme I supposed it was invoked only once.
Thank you
Best regards
I've got a TemplateContextContributor component with
property = {[b]"type=" [/b]+ TemplateContextContributor.[i][b]TYPE_THEME[/b][/i]},
and I just realized it is invoked several times during the page load. I guess once for each component in the page.
Why is this happening? If contextContributor is only for the theme I supposed it was invoked only once.
Thank you
Best regards
There are multiple ftl scripts being run from the theme. One for the layout, the main one(portal_normal.ftl), and then a wrapper for each portlet on the page (portlet.ftl) and maybe more (I could be missing some).
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™