<?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 access the theme init_custom.ftl variables from a Fragment</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121369056" />
  <subtitle>How to access the theme init_custom.ftl variables from a Fragment</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121369056</id>
  <updated>2026-04-04T17:32:59Z</updated>
  <dc:date>2026-04-04T17:32:59Z</dc:date>
  <entry>
    <title>RE: How to access the theme init_custom.ftl variables from a Fragment</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122401800" />
    <author>
      <name>Vinícius Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=122401800</id>
    <updated>2024-02-20T17:37:55Z</updated>
    <published>2024-02-15T17:51:54Z</published>
    <summary type="html">&lt;p&gt;Hello Marcos, I know it's a bit late but you can do so by including
  this in your fragment:&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;[#include fullTemplatesPath + &amp;quot;/path/to/file/template.ftl&amp;quot; /]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By using this line of code, you can not only use variables but also
  macros on that template you just included&lt;/p&gt;</summary>
    <dc:creator>Vinícius Carvalho</dc:creator>
    <dc:date>2024-02-15T17:51:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to access the theme init_custom.ftl variables from a Fragment</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121388704" />
    <author>
      <name>Lee Jordan</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121388704</id>
    <updated>2022-03-31T15:38:33Z</updated>
    <published>2022-03-31T15:38:33Z</published>
    <summary type="html">&lt;p&gt;Check your build directory in the theme, as I understand (I may be
  wrong) the init_custom gets imported to the init file.&lt;br /&gt;
  &lt;br /&gt; Does this work?&lt;br /&gt;  &lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;[#include init_custom/]&lt;/code&gt;&lt;/pre&gt;</summary>
    <dc:creator>Lee Jordan</dc:creator>
    <dc:date>2022-03-31T15:38:33Z</dc:date>
  </entry>
  <entry>
    <title>How to access the theme init_custom.ftl variables from a Fragment</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121369055" />
    <author>
      <name>Marcos Blandim Andrade</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121369055</id>
    <updated>2022-02-25T21:31:24Z</updated>
    <published>2022-02-25T13:48:03Z</published>
    <summary type="html">&lt;p&gt;As I understood, you can use the theme `init_custom.ftl` file to
  override `init.ftl` or to create new variables to be used in the
  theme. I've also noticed that if you add this line of code inside your
  Fragment, you'll have access to your theme `init.ftl` variables, but
  not to your `init_custom.ftl` ones&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-html"&gt;[#include init/]&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is there a way to access `init_custom.ftl` variables inside a
  Fragment in Liferay 7.3?&lt;/p&gt;</summary>
    <dc:creator>Marcos Blandim Andrade</dc:creator>
    <dc:date>2022-02-25T13:48:03Z</dc:date>
  </entry>
</feed>
