<?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>How to add meta property dynamically from freemarker template</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117816780" />
  <subtitle>How to add meta property dynamically from freemarker template</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117816780</id>
  <updated>2026-04-06T02:03:19Z</updated>
  <dc:date>2026-04-06T02:03:19Z</dc:date>
  <entry>
    <title>RE: How to add meta property dynamically from freemarker template</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121393161" />
    <author>
      <name>Fay Anabelle</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121393161</id>
    <updated>2022-04-05T18:32:04Z</updated>
    <published>2022-04-05T16:47:30Z</published>
    <summary type="html">&lt;p&gt;The current version of Liferay includes Open Graph Tags in the
  layouts. In the layout setup, look for the Open Graph area &lt;u&gt;
    &lt;a href="https://fivenightsatfreddys.online"&gt;&lt;span
        style="color: rgb(255,255,255);"&gt;five nights at freddy's&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/p&gt;</summary>
    <dc:creator>Fay Anabelle</dc:creator>
    <dc:date>2022-04-05T16:47:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add meta property dynamically from freemarker template</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121383327" />
    <author>
      <name>Filipe Santos Paiva</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121383327</id>
    <updated>2022-03-23T16:23:32Z</updated>
    <published>2022-03-23T09:33:27Z</published>
    <summary type="html">&lt;p&gt;It's not working for me, someone has other solution?&lt;/p&gt;</summary>
    <dc:creator>Filipe Santos Paiva</dc:creator>
    <dc:date>2022-03-23T09:33:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add meta property dynamically from freemarker template</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119157937" />
    <author>
      <name>Luis Silva</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119157937</id>
    <updated>2020-05-14T21:20:52Z</updated>
    <published>2020-05-14T21:20:52Z</published>
    <summary type="html">Cool, I found myself with the same problem and your answer helped.</summary>
    <dc:creator>Luis Silva</dc:creator>
    <dc:date>2020-05-14T21:20:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add meta property dynamically from freemarker template</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117831356" />
    <author>
      <name>Ovidiu David Dan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117831356</id>
    <updated>2019-11-20T11:12:43Z</updated>
    <published>2019-11-20T11:12:43Z</published>
    <summary type="html">I finally got it to work correctly with:&amp;lt;@liferay_util[&amp;#34;html-top&amp;#34;]&amp;gt;&lt;br /&gt;                   &amp;lt;meta name=&amp;#34;image&amp;#34; property=&amp;#34;og:image&amp;#34; content=&amp;#34;srcImage&amp;#34;&amp;gt;&lt;br /&gt; &amp;lt;/@&amp;gt;</summary>
    <dc:creator>Ovidiu David Dan</dc:creator>
    <dc:date>2019-11-20T11:12:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to add meta property dynamically from freemarker template</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117825505" />
    <author>
      <name>Ovidiu David Dan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117825505</id>
    <updated>2019-11-19T10:47:24Z</updated>
    <published>2019-11-19T10:47:24Z</published>
    <summary type="html">I managed to do it with &amp;lt;@liferay_util [&amp;#34;html-top&amp;#34;] /&amp;gt; but it works only when browsing between pages. If I access the page directly, I cannot add to the head what I need.&lt;br /&gt;I use Liferay 7.2 that being a SPA application may have to do with this matter&lt;br /&gt;Anyone have any ideas?</summary>
    <dc:creator>Ovidiu David Dan</dc:creator>
    <dc:date>2019-11-19T10:47:24Z</dc:date>
  </entry>
  <entry>
    <title>How to add meta property dynamically from freemarker template</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117816779" />
    <author>
      <name>Ovidiu David Dan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117816779</id>
    <updated>2019-11-18T16:50:04Z</updated>
    <published>2019-11-18T16:50:04Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hello, I want to add to the head of&amp;nbsp;some pages the meta&amp;nbsp;og:image.&amp;nbsp; I added this code to my template:&lt;pre&gt;&lt;code&gt;&amp;lt;liferay-util:html-top outputkey="htmltop"&amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;meta property="og:image" content="${imagen_destacados.getData()}"&amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;/liferay-util:html-top&amp;gt;&lt;/code&gt;&lt;/pre&gt;but it doesn´t work.Does anyone have any idee of the reason why it doesn't work for me?&lt;br&gt;&lt;br&gt;Looking at the documentation I founded this:The Liferay-Util taglib is also available via a macro for your FreeMarker theme templates and web content templates. Follow this syntax:&lt;br&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;@liferay_util["tag-name"] attribute="string value" attribute=10 /&amp;amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;Is this what i need to put in my template? I tried to put it in my template but it doen't work..&lt;br&gt;Thanks&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Ovidiu David Dan</dc:creator>
    <dc:date>2019-11-18T16:50:04Z</dc:date>
  </entry>
</feed>
