<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>TemplateContextContributor invoked multiple times</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114739079" />
  <subtitle>TemplateContextContributor invoked multiple times</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114739079</id>
  <updated>2026-04-06T16:38:30Z</updated>
  <dc:date>2026-04-06T16:38:30Z</dc:date>
  <entry>
    <title>RE: TemplateContextContributor invoked multiple times</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114807481" />
    <author>
      <name>Amos Fong</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114807481</id>
    <updated>2019-08-19T18:22:47Z</updated>
    <published>2019-08-19T18:22:47Z</published>
    <summary type="html">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).</summary>
    <dc:creator>Amos Fong</dc:creator>
    <dc:date>2019-08-19T18:22:47Z</dc:date>
  </entry>
  <entry>
    <title>TemplateContextContributor invoked multiple times</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114739078" />
    <author>
      <name>Miguel Ángel Júlvez</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114739078</id>
    <updated>2019-08-12T14:53:00Z</updated>
    <published>2019-08-12T14:53:00Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi there,&lt;br&gt;&lt;br&gt;I've got a TemplateContextContributor component&amp;nbsp;with&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;property = {[b]"type=" [/b]+ TemplateContextContributor.[i][b]TYPE_THEME[/b][/i]},&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;and I just realized it is invoked several times during the page load. I guess once for each component in the page.&lt;br&gt;Why is this happening?&amp;nbsp; If contextContributor is only for the theme I supposed it was invoked only once.&lt;br&gt;Thank you&lt;br&gt;Best regards&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Miguel Ángel Júlvez</dc:creator>
    <dc:date>2019-08-12T14:53:00Z</dc:date>
  </entry>
</feed>
