RE: TemplateContextContributor invoked multiple times

thumbnail
Miguel Ángel Júlvez, modified 6 Years ago. Junior Member Posts: 64 Join Date: 3/29/11 Recent Posts
Hi there,

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
thumbnail
Amos Fong, modified 6 Years ago. Liferay Legend Posts: 2047 Join Date: 10/7/08 Recent Posts
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).