<?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 change the look and feel of embedded portlet?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117788487" />
  <subtitle>How to change the look and feel of embedded portlet?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117788487</id>
  <updated>2026-04-03T23:22:19Z</updated>
  <dc:date>2026-04-03T23:22:19Z</dc:date>
  <entry>
    <title>RE: How to change the look and feel of embedded portlet?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117851786" />
    <author>
      <name>Alfonso Crisci</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117851786</id>
    <updated>2019-11-22T08:44:13Z</updated>
    <published>2019-11-22T08:44:13Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Fabio, sorry for the delay, I was at DEVCON earlier this week. How about this (Velocity/tpl) approach?&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="my-liferay-layout" id="main-content" role="main"&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;div class="portlet-layout row"&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;div class="col-md-12 portlet-column portlet-column-only" id="column-1"&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;$velocityPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone")
&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;$theme.runtime("com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet", "",
            $velocityPortletPreferences.toString())
&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;$velocityPortletPreferences.reset()
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;/div&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Alfonso Crisci</dc:creator>
    <dc:date>2019-11-22T08:44:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to change the look and feel of embedded portlet?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117842994" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117842994</id>
    <updated>2019-11-21T16:21:13Z</updated>
    <published>2019-11-21T16:21:13Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Ok. So I could not find any solution for my problem and I went back to velocity (tpl). I also found out that you can add breadcrumbs with:&lt;pre&gt;&lt;code&gt;$theme.breadcrumb("", false, false, true, true)
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;I can't find any documentation for this. I suppose that the params are the same as the configuration options that the default Breadcrumb portlet have, but I am unsure about the first param (the String one).&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-11-21T16:21:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to change the look and feel of embedded portlet?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117815066" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117815066</id>
    <updated>2019-11-18T13:26:16Z</updated>
    <published>2019-11-18T13:26:16Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Alfonso,&lt;br&gt;&lt;br&gt;I could add the portlet with your solution, but I could not change the preferences this way. So I tried to change from tpl to ftl format and I could do something like this:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="my-breadcrumb-css"&amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;lt;#assign preferences = freeMarkerPortletPreferences.getPreferences("portletSetupPortletDecoratorId", "barebone") /&amp;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;lt;@liferay_portlet["runtime"]
&amp;amp;nbsp; &amp;amp;nbsp;     defaultPreferences="${preferences}"
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; portletName="com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet" /&amp;amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class="my-column-css"&amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; ${processor.processColumn("column-1", "portlet-column-content")}
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;The problem is that "liferay_portlet" is null or missing:&lt;br&gt;&lt;pre&gt;&lt;code&gt;
FreeMarker template error:
The following has evaluated to null or missing:
==&amp;amp;gt; liferay_portlet &amp;amp;nbsp;[in template "my_theme_CUSTOM_layout_simple" at line 5, column 27]----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use &amp;amp;lt;#if myOptionalVar??&amp;amp;gt;when-present&amp;amp;lt;#else&amp;amp;gt;when-missing&amp;lt;!--#if--&amp;gt;. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
--------
FTL stack trace ("~" means nesting-related):
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;- Failed at: @liferay_portlet["runtime"] defaultPr... &amp;amp;nbsp;[in template "my_theme_CUSTOM_layout_simple" at line 5, column 25]
----
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Am I missing some include? How could this be missing?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-11-18T13:26:16Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to change the look and feel of embedded portlet?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117795591" />
    <author>
      <name>Alfonso Crisci</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117795591</id>
    <updated>2019-11-15T18:45:09Z</updated>
    <published>2019-11-15T18:45:09Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Ricardo,&lt;br&gt;No problem. Again, without testing myself, something like this might help:&lt;br&gt;&lt;pre&gt;&lt;code&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; $theme.runtime("mytest_INSTANCE_1234", "", "")
&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; #set($VOID = $velocityPortletPreferences.reset())
&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; #set($VOID = $velocityPortletPreferences.setValue('portletSetupPortletDecoratorId', 'barebone'))
&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; $theme.runtime("mytest_INSTANCE_1234", "", $velocityPortletPreferences.toString())
&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; #set($VOID = $velocityPortletPreferences.reset())
&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; $processor.processColumn("column-1", "portlet-column-content portlet-column-content-last")
&lt;/code&gt;&lt;/pre&gt;Also, just as info, as of &lt;a href="https://issues.liferay.com/browse/LPS-75190"&gt;https://issues.liferay.com/browse/LPS-75190&lt;/a&gt;, layout templates can also be .ftl (Freemarker) instead of .tpl. You can change the file extension of file e.g. docroot/test.tpl to &lt;strong&gt;.ftl &lt;/strong&gt;and the&lt;strong&gt; &lt;/strong&gt;template-path to &lt;strong&gt;.ftl&lt;/strong&gt; in the file docroot/WEB-INF/liferay-layout-templates.xml&lt;strong&gt;&lt;/strong&gt;.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Alfonso Crisci</dc:creator>
    <dc:date>2019-11-15T18:45:09Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to change the look and feel of embedded portlet?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117788889" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117788889</id>
    <updated>2019-11-15T15:06:21Z</updated>
    <published>2019-11-15T15:06:21Z</published>
    <summary type="html">Hi Alfonso,&lt;br /&gt;&lt;br /&gt;Thanks for the answer. This code you quote works indeed in the ftl file format. But what I was looking for was for the tpl file. I know that I asked for ftl, but it was a mistake typing. I will edit the post.</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-11-15T15:06:21Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to change the look and feel of embedded portlet?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117790318" />
    <author>
      <name>Alfonso Crisci</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117790318</id>
    <updated>2019-11-15T14:16:51Z</updated>
    <published>2019-11-15T14:16:51Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;In Liferay 7, It should be possible in a way similar to this (I did not test yet):&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign preferences = freeMarkerPortletPreferences.getPreferences({"portletSetupPortletDecoratorId" : "barebone"}) /&amp;amp;gt;
&amp;amp;lt;@liferay_portlet["runtime"]
defaultPreferences="${preferences}"
portletName="com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet"
/&amp;amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;Docs: &lt;a href="https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/applying-portlet-decorators-to-embedded-portlets"&gt;https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/applying-portlet-decorators-to-embedded-portlets&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Alfonso Crisci</dc:creator>
    <dc:date>2019-11-15T14:16:51Z</dc:date>
  </entry>
  <entry>
    <title>How to change the look and feel of embedded portlet?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117788486" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117788486</id>
    <updated>2019-11-15T12:28:03Z</updated>
    <published>2019-11-15T12:28:03Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&lt;br&gt;&lt;br&gt;I have a custom-layout.tpl in my theme, and right now I am trying to add a BreadCrumb Portlet to my layout. To add it, I am doing like this:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;div class="my-css-class"&amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; $processor.processPortlet("com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet")
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;This is adding my portlet just like I want, but I would love to add it as Barebone. Is there any way to pass this value in my tpl file?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-11-15T12:28:03Z</dc:date>
  </entry>
</feed>
