<?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>RE: Clay UI dropdown direction?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113176267" />
  <subtitle>RE: Clay UI dropdown direction?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113176267</id>
  <updated>2026-04-03T23:27:45Z</updated>
  <dc:date>2026-04-03T23:27:45Z</dc:date>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113331790" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113331790</id>
    <updated>2019-04-22T07:02:23Z</updated>
    <published>2019-04-22T07:02:23Z</published>
    <summary type="html">Hi Andrew, &lt;br /&gt;&lt;br /&gt;I&amp;#39;ve updated the template to use the &lt;a href="https://github.com/liferay/com-liferay-site-navigation/blob/master/site-navigation-language-web/src/main/resources/com/liferay/site/navigation/language/web/portlet/template/dependencies/portlet_display_template_icon_menu.ftl"&gt;Icon Menu code&lt;/a&gt; as the base, as the UI is closer to what I want. However, it does not seem to have any function to update the portal&amp;#39;s language when clicking on a choice, nor does it render the same as when selecting Icon Menu from the display template.&lt;br /&gt;&lt;br /&gt;Your sample earlier, which is select box style, has the function included in the template. How do I invoke the language update in my custom template?</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-22T07:02:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113324122" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113324122</id>
    <updated>2019-04-21T02:06:31Z</updated>
    <published>2019-04-21T02:06:31Z</published>
    <summary type="html">You&amp;#39;ve been really great Andrew &lt;img alt="emoticon" src="@theme_images_path@/emoticons/smile.gif" &gt;</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-21T02:06:31Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113315439" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113315439</id>
    <updated>2019-04-20T02:31:13Z</updated>
    <published>2019-04-20T02:31:13Z</published>
    <summary type="html">Yep -- and now that you control the template key, you shouldn&amp;#39;t have to worry about the migration from environment to environment. If you used the export/import, I&amp;#39;m pretty sure that kind of stuff is maintained, but my own experience with the export/import process has been less than stellar so I often find myself simpy recreating artifacts as part of the deployment. &lt;br /&gt;&lt;br /&gt;​​​​​​​Happy to help -- let me know if you need anything else.</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-20T02:31:13Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113314064" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113314064</id>
    <updated>2019-04-20T01:20:28Z</updated>
    <published>2019-04-20T01:20:28Z</published>
    <summary type="html">Hi Andrew, &lt;br /&gt;&lt;br /&gt;I see. Alright I think I get it now. So now, all that&amp;#39;s left to do is to edit the template to my liking, correct? &lt;br /&gt;&lt;br /&gt;​​​​​​​You&amp;#39;ve been really helpful and I hope this thread will help more beginners in the future. Thank you so much! </summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-20T01:20:28Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113304372" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113304372</id>
    <updated>2019-04-19T15:11:43Z</updated>
    <published>2019-04-19T15:11:43Z</published>
    <summary type="html">Hey Jason,&lt;br /&gt;&lt;br /&gt;So the way it works is every portle/page (layout) combination will have it&amp;#39;s own preferences. That is why i was asking you to filter the portlet preferencs on the plid (plid = Page Layout ID) so that you could see the page where the portlet was embedded. &lt;br /&gt;&lt;br /&gt;Now, if you created a bunch of other page and then started navigating to them, then your Language portlet woul dbe embedded in those as well, and as a result you woul dhave a whole whack of rows in the PortletPreferences table with you embedded preferences. When you want to CHANGE the embedded preferences though, you need to nuke these records.&lt;br /&gt;&lt;br /&gt;Now going and querying page by page would be painful. So instead you can run the select to get all the records where the portletId (column) matches the id for your language portlet. Running this query will give you all the records across all the pages where it has been embedded. In this case, because the language portlet is not intanceable (it can only be added to any given page one time) there is virtually no risk that you will delete the wrong records (because you are only working with one site). I still like to run the select first though and look at the row count (usually I know roughly how many pages I have) and then just scan the records.&lt;br /&gt;&lt;br /&gt;Once you are satified, change your select * to a delete from .. and then clear your cache, and re-hit your page and the new settings should be stored in the DB. You can verify with the same queries of course.</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-19T15:11:43Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113303777" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113303777</id>
    <updated>2019-04-19T14:59:40Z</updated>
    <published>2019-04-19T14:59:40Z</published>
    <summary type="html">Ahh, I was following these:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;1. Go back to your portlet and add a NEW template for it&lt;br /&gt;2. Notice that this time you have an editable field where you can enter the template key -- give it a name -- and use a template that you can identify as different from the one you are using now&lt;br /&gt;3. Go back to your theme and change your preference to use your NEW key&lt;br /&gt;4. Then do gotcha #1 (delete the preferences, clear the cache)&lt;br /&gt;5. Deploy your theme and make sure it works&lt;br /&gt;&lt;/blockquote&gt;I was assuming that gotcha #3 will come later lol. Alright, I understand gotcha #2 and #3  and I can now make the new template with custom key. However, I&amp;#39;m not 100% certain about this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;select all the rows where the portlet id matches your portlet reference&lt;br /&gt;&lt;/blockquote&gt;What exactly am I looking for here? I didn&amp;#39;t want to delete any wrong preference and screw up, lol!</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-19T14:59:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113299591" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113299591</id>
    <updated>2019-04-19T12:51:40Z</updated>
    <published>2019-04-19T12:51:40Z</published>
    <summary type="html">Are you sure you got that checkbox? .. that or maybe the Details section is closed and it hiding it on you. Here are some screenshots from my side. </summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-19T12:51:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113293732" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113293732</id>
    <updated>2019-04-19T06:31:02Z</updated>
    <published>2019-04-19T06:31:02Z</published>
    <summary type="html">Hi Andrew,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve gone back to the language selector&amp;#39;s Configuration &amp;gt; Manage Template &amp;gt; Add. However, I&amp;#39;m not seeing the template key field mentioned when creating a new template&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;2. Notice that this time you have an editable field where you can enter the template key -- give it a name -- and use a template that you can identify as different from the one you are using now&lt;br /&gt;&lt;/blockquote&gt;I just see Name, Language, Description and Small Image followed by the script editor.</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-19T06:31:02Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113285526" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113285526</id>
    <updated>2019-04-18T16:10:50Z</updated>
    <published>2019-04-18T16:10:50Z</published>
    <summary type="html">Hi Jason, &lt;br /&gt;&lt;br /&gt;Good stuff. &lt;br /&gt;&lt;br /&gt;OK -- Gotcha #1. When you want to change the preferences. &lt;br /&gt;&lt;br /&gt;Let&amp;#39;s say for example you make a new template and you want to change the preferences map to reference the new guy. The problem is that because the portlet is already embedded, you can change the string, but it won&amp;#39;t get picked up. What you need to do is remove the preferences so that they get re-generated. To do this you need to go back to the portlet preferences table and this time you want to select all the rows where the portlet id matches your portlet reference. I always do a select first and just eyball the details and when I am happy that I am seeing what I no longer need, I run a delete. Now, because you ran a direct query the cache has not been updated so yo uprobably still have the old stuff in it. Once you run this query, go to the Control Panel &amp;gt; Configuration &amp;gt; Server Administration and clear the caches (most importantly the database cache)&lt;br /&gt;&lt;br /&gt;NOTE!!! You should pretty much always avoid direct queries in the database. Liferay does not use foreign keys so you can really mess things up if you don&amp;#39;t know what you are doing.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Gotcha #2 -- Removing the portlet&lt;br /&gt;&lt;br /&gt;Let&amp;#39;s say you decide that you don&amp;#39;t want to provide your site in multiple languages anymore. So you go into your theme and you remove the embedded code. That&amp;#39;s works, BUT the problem is that it doesn&amp;#39;t actually trigger a &amp;#34;delete portlet from page&amp;#34;. All it does is stop triggering the render. All the records are still there (database wise) .. but since you can&amp;#39;t see the portlet it is orphaned. Ok, so now, let&amp;#39;s say you do this on your &amp;#34;test&amp;#34; page (try this out). Go to the Pages section for your site in the control panel. Click on the Test page from the miller columns. Click on the stop light menu on the end and choose Orphaned something or other. It will open a window and you can see all the portlets that are associated with the page that are embedded or static. You would delete it from here. Now, go back to the test page (on the site). Because that portlet (which is not instanceable -- meaning only one per page) is no longer associated with the page, you can manually add the portlet from the widgets. So in this very round about example, you could decide not to make your whole site language switchable, but you might have a page that is. &lt;br /&gt;&lt;br /&gt;Gotcha #3 -- ADT id&lt;br /&gt;&lt;br /&gt;This is the tricky one. As you move from one environment to the next, how can you be sure that your ADT Template (DDMTemplate) id will be the same? Ugh. I am going from memory here, but I am pretty sure that the ID values is in fact the template key. By default thought, Liferay is configured to auto-generate these keys -- but youcan change that so that you can control the key and in each environment give it the same name. Go to&lt;br /&gt;&lt;br /&gt;1. Control Panel &amp;gt; Configuration &amp;gt; System Settings &amp;gt; Dynamic Data Mapping &lt;br /&gt;2. Uncheck the Autogenerate etc template.&lt;br /&gt;&lt;br /&gt;Now for your exercise &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;&lt;br /&gt;&lt;br /&gt;1. Go back to your portlet and add a NEW template for it&lt;br /&gt;2. Notice that this time you have an editable field where you can enter the template key -- give it a name -- and use a template that you can identify as different from the one you are using now&lt;br /&gt;3. Go back to your theme and change your preference to use your NEW key&lt;br /&gt;4. Then do gotcha #1 (delete the preferences, clear the cache)&lt;br /&gt;5. Deploy your theme and make sure it works&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;​​​​​​​Let me know how it goes. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  the portlet, AND ALSO the preferences. Now, the portlet is embedded, so how the heck are you supposed to r</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-18T16:10:50Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113284528" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113284528</id>
    <updated>2019-04-18T15:06:48Z</updated>
    <published>2019-04-18T15:06:48Z</published>
    <summary type="html">Hi Andrew, great! I do see the embedded Language Selector now. Do tell me about the gotchas.</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-18T15:06:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113284168" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113284168</id>
    <updated>2019-04-18T14:50:32Z</updated>
    <published>2019-04-18T14:50:32Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hey Jason,&lt;br&gt;&lt;br&gt;Yep, that looks right to me. So you have --&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;!--?xml version="1.0" encoding="UTF-8"?--&amp;gt; &amp;lt;portlet-preferences&amp;gt; &amp;lt;preference&amp;gt; &amp;lt;name&amp;gt;displayStyle&amp;lt;/name&amp;gt; &amp;lt;value&amp;gt;ddmTemplate_37521&amp;lt;/value&amp;gt; &amp;lt;/preference&amp;gt; &amp;lt;preference&amp;gt; &amp;lt;name&amp;gt;languageIds&amp;lt;/name&amp;gt; &amp;lt;value&amp;gt;en_US,ca_ES,zh_CN,nl_NL,fi_FI,fr_FR,de_DE,iw_IL,hu_HU,ja_JP,pt_BR,es_ES&amp;lt;/value&amp;gt; &amp;lt;/preference&amp;gt; &amp;lt;preference&amp;gt; &amp;lt;name&amp;gt;displayCurrentLocale&amp;lt;/name&amp;gt; &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt; &amp;lt;/preference&amp;gt; &amp;lt;preference&amp;gt; &amp;lt;name&amp;gt;displayStyleGroupId&amp;lt;/name&amp;gt; &amp;lt;value&amp;gt;20126&amp;lt;/value&amp;gt; &amp;lt;/preference&amp;gt; &amp;lt;/portlet-preferences&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;.. and the "name" nodes become your "keys" and the "value" nodes become your values of course. So try the last step with that and let me know how it goes. Once you see the embeeded portlet using your template we'll look at the next step -- the gotchas that you need to work through.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-18T14:50:32Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113279038" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113279038</id>
    <updated>2019-04-18T04:00:38Z</updated>
    <published>2019-04-18T04:00:38Z</published>
    <summary type="html">Hi Andrew, sorry for the delay. I had problem starting up and figured I&amp;#39;d go with a fresh copy.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve identified the new language select and its preference as below:&lt;br /&gt;&amp;lt;portlet-preferences&amp;gt;&amp;lt;preference&amp;gt;&amp;lt;name&amp;gt;displayStyle&amp;lt;/name&amp;gt;&amp;lt;value&amp;gt;ddmTemplate_37521&amp;lt;/value&amp;gt;&amp;lt;/preference&amp;gt;&amp;lt;preference&amp;gt;&amp;lt;name&amp;gt;languageIds&amp;lt;/name&amp;gt;&amp;lt;value&amp;gt;en_US,ca_ES,zh_CN,nl_NL,fi_FI,fr_FR,de_DE,iw_IL,hu_HU,ja_JP,pt_BR,es_ES&amp;lt;/value&amp;gt;&amp;lt;/preference&amp;gt;&amp;lt;preference&amp;gt;&amp;lt;name&amp;gt;displayCurrentLocale&amp;lt;/name&amp;gt;&amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt;&amp;lt;/preference&amp;gt;&amp;lt;preference&amp;gt;&amp;lt;name&amp;gt;displayStyleGroupId&amp;lt;/name&amp;gt;&amp;lt;value&amp;gt;20126&amp;lt;/value&amp;gt;&amp;lt;/preference&amp;gt;&amp;lt;/portlet-preferences&amp;gt;&lt;br /&gt;&lt;br /&gt;However, I don&amp;#39;t see the XML string with the key/value pairs. Is the code above the correct one?</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-18T04:00:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113275922" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113275922</id>
    <updated>2019-04-17T20:06:30Z</updated>
    <published>2019-04-17T20:06:30Z</published>
    <summary type="html">Hey Jason, &lt;br /&gt;&lt;br /&gt;Hmm.. I have a couple thoughts. First is that perhaps you are not actually using the guest site as I had originally assumed &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;. I can see from your first screenshot that you have a record for a group called NVIS -- is it possible that the site you are working with is that one and not the default (Guest) one? ... maybe share with me the full URL you are using for your page?&lt;br /&gt;&lt;br /&gt;.. If you are SURE that it is Guest though and it is still not working then the next thing I would try is adding another portlet or two to the page. Just make sure that the page you are using is one that you didn&amp;#39;t have in place already and had accessed BEFORE you removed the embedded portelt from your theme. It should be pretty obvious mind you since the Language Selector can only be added to any given page one time.&lt;br /&gt;&lt;br /&gt;My money is on the site reference. </summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-17T20:06:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113274851" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113274851</id>
    <updated>2019-04-17T16:44:14Z</updated>
    <published>2019-04-17T16:44:14Z</published>
    <summary type="html">Hi Andrew, &lt;br /&gt;&lt;br /&gt;First of all, thank you for your continuous guidance. It is indeed very helpful for beginners and hopefully more people can learn from your answers.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve managed to follow up to this point :&lt;blockquote&gt;6. select * from PortletPreferences where plid = &amp;lt;plid&amp;gt;;&lt;/blockquote&gt;&lt;br /&gt;At that point, in Squirrel SQL, I cannot locate the plid that is same as the one for friendly url &amp;#34;/test&amp;#34; (test being the name of the page I created in Step 1).&lt;br /&gt;&lt;br /&gt;&lt;img src="https://i.ibb.co/zS6BS2g/1.png" /&gt;&lt;br /&gt;&lt;img src="https://i.ibb.co/rd8gXj4/2.png" /&gt;&lt;img src="https://i.ibb.co/7Qmztg6/3.png" /&gt;&lt;br /&gt;&lt;br /&gt;Any idea what I&amp;#39;ve missed out?</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-17T16:44:14Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113272830" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113272830</id>
    <updated>2019-04-17T13:44:56Z</updated>
    <published>2019-04-17T13:44:56Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Jason,&lt;br&gt;&lt;br&gt;I thought maybe that is what it was! I'm glad I asked for a screenshot. The good news is that you don't have to override anything, you can actually change this look and feel using configuration. The not so great news is that there are several steps you have to perform so it's not for the faint of heart. I think you mentioned being new to Liferay so I'll try to outline all the steps, but be forewarned that this is off the cuff.&amp;nbsp;&lt;br&gt;&lt;br&gt;There are multiple steps, so i'll outline them one at a time.&lt;br&gt;&lt;br&gt;&lt;strong&gt;Explanation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;You're basically embedding a portlet in the theme so that you don't have to add it manually to every page. What you are doing is fine, but there is an alternative that is available for a few of Liferay's out of the box portlets where Liferay provides for you a macro that you can use to accomplish the same goal. In this case you could use the macro like this --&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;@liferay.languages/&amp;amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;.. be sure to include the "s" on the end. There is a version without the s can be used to translate language keys. Ok, so this macro will basically do what you are doing manually, embed the portlet whereever you put it. Not he good news is that the Language portlet is not ADT enabled. This means that the portlet was updated so that the template that is used to render the portlet is something that can be controlled at runtime through configuration, including creation of the template. This feature was introduced in 6.2 and is one of my favourites &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif"&gt;. So what you can do is define a custom ADT for this portlet with the markup you want to use to render the drop down. Then you will look create a preferences string which you can pass as part of the macro tag above and as you navigate from page to page (including new ones you add) the portlet will automatically be added and configured for you.&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;strong&gt;Step #1 - Generating the Preferences&lt;/strong&gt;&lt;br&gt;&lt;br&gt;The first thing I do here is I go to a page and I manually add the portlet to the page. Then I configure the portlet and grab the preferences out of the database so I am sure not to make an error with my embedded string. Sooo..&lt;br&gt;&lt;br&gt;1. Create a new page&lt;br&gt;2. Go to that page&lt;br&gt;3. Add the Language Selector portlet from the widgets to the page&lt;br&gt;4. Hover on the portlet to access the stop light menu and then choose Configuration from the options&lt;br&gt;5. You will see a link that says "Manage Templates" -- click it&lt;br&gt;6. Then you Add a new template&lt;br&gt;&lt;br&gt;This is the internal one that Liferay provides, so you can start with it and make your changes as you need.&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#if entries?has_content&amp;amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;lt;#assign languageId = localeUtil.toLanguageId(locale) /&amp;amp;gt;

&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;style&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;.taglib-language-option {
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;background: none no-repeat 5px center;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;padding-left: 25px;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}

&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;#list entries as entry&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;.taglib-language-option-${entry.getW3cLanguageId()} {
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;background-image: url(${themeDisplay.getPathThemeImages()}/language/${entry.getLanguageId()}.png);
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/#list&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;

&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;lt;@liferay_aui["form"]
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;action=formAction
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;method="post"
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;name='${namespace + formName}'
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;useNamespace=false
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;lt;@liferay_aui["select"]
&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;changesContext=true
&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;id='${namespace + formName}'
&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;label=""
&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;name='${name}'
&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;onChange='${namespace + "changeLanguage();"}'
&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;title="language"
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&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;nbsp;&amp;amp;lt;#list entries as entry&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;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;lt;@liferay_aui["option"]
&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;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;cssClass="taglib-language-option taglib-language-option-${entry.getW3cLanguageId()}"
&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;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;disabled=entry.isDisabled()
&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;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;label=entry.getLongDisplayName()
&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;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;lang=entry.getW3cLanguageId()
&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;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;selected=entry.isSelected()
&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;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;value=entry.getLanguageId()
&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;amp;nbsp;/&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;nbsp;&amp;lt;!--#list--&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;!--@--&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;lt;!--@--&amp;gt;

&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;lt;@liferay_aui["script"]&amp;amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;function ${namespace}changeLanguage() {
&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;var languageId = AUI.$(document.${namespace + formName}.${name}).val();

&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;submitForm(document.${namespace + formName});
&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;!--@--&amp;gt;
&amp;lt;!--#if--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;7. Ok, now save, save, save ... basically close it all out.&amp;nbsp;&lt;br&gt;8. Go back into the configuration and choose your custom template and save&lt;br&gt;&lt;br&gt;&lt;strong&gt;Step #2 - Retrieveing the Preferences&lt;/strong&gt;&lt;br&gt;&lt;br&gt;This is a trick I like to use. There may be other ways, but I have found this to work well enough.&amp;nbsp;&lt;br&gt;&lt;br&gt;1. Open up some tool that you can use to query your database&lt;br&gt;2. select * from Group_ where groupKey like '%Guest%'; &amp;nbsp; &amp;nbsp;-- this is assuming of course you are using the default site /web/guest or /group/guest&lt;br&gt;3. Make note of the groupId&lt;br&gt;4. select * from layout where groupId = &amp;lt;groupId&amp;gt; and friendlyURL like '%/my-page%' &amp;nbsp;-- use the friendly url you set for your page&lt;br&gt;5. Make note of the plid&lt;br&gt;6. select * from PortletPreferences where plid = &amp;lt;plid&amp;gt;;&lt;br&gt;&lt;br&gt;&lt;br&gt;in the results you want to find the row for the language portlet and then copy the value in the preferences column. You can see in the XML string the key/value pairs that are used -- we're going to use those with the macro.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;Step #3 - Embedding your Portlet&lt;/strong&gt;&lt;br&gt;&lt;br&gt;1. Go back to your theme&lt;br&gt;2. Update your code so it looks like this&amp;nbsp;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;@liferay.languages default_preferences=freeMarkerPortletPreferences.getPreferences({"key": "value", "key": "value"}) /&amp;amp;gt;
${freeMarkerPortletPreferences.reset()}
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;3. &amp;nbsp;.. making sure to change the "key" and "value" items there to match the ones you grabbed from the DB in the last step.&amp;nbsp;&lt;br&gt;4. save and deploy your code.&amp;nbsp;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;And that should be it! Now there is a gotcha here. A couple actually. But let's start with this and work our way through any issues you have and then we can talk about the gotchas. &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif"&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-17T13:44:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113264407" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113264407</id>
    <updated>2019-04-17T02:02:15Z</updated>
    <published>2019-04-17T02:02:15Z</published>
    <summary type="html">Hi Andrew, sorry for the delay. What I&amp;#39;m trying to achieve is a language selector dropdown that, well, drops down lol. This portlet, as you&amp;#39;ve pointed out, is embedded into my theme&amp;#39;s header.&lt;br /&gt;&lt;br /&gt;The generated dropdown appears to the left instead, as shown below:&lt;br /&gt;&lt;br /&gt;&lt;img src="https://i.ibb.co/xjRMRZg/Screen-Shot-2019-04-17-at-9-58-29-AM.png" /&gt;&lt;br /&gt;&lt;br /&gt;​​​​​​​</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-17T02:02:15Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113255563" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113255563</id>
    <updated>2019-04-16T13:59:29Z</updated>
    <published>2019-04-16T13:59:29Z</published>
    <summary type="html">Ah! ok -- that&amp;#39;s a taglib, but what it is doing is embedding a portlet. I don&amp;#39;t think that is the right tag though, but that code you are sharing is embedding the LanguageEntry which looks like the language toggle option. &lt;br /&gt;&lt;br /&gt;Can you send me a screenshot of what it is you are trying to change?</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-16T13:59:29Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113245002" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113245002</id>
    <updated>2019-04-16T01:13:03Z</updated>
    <published>2019-04-16T01:13:03Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Andrew,&lt;br&gt;&lt;br&gt;I'm not 100% sure how to check for that. Do you mean this?&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;@liferay_portlet["runtime"]
   defaultPreferences=default_preferences
   portletProviderAction=portletProviderAction.VIEW
   portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.LanguageEntry"
/&amp;amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-16T01:13:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113237243" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113237243</id>
    <updated>2019-04-15T13:54:04Z</updated>
    <published>2019-04-15T13:54:04Z</published>
    <summary type="html">Hi Jason,&lt;br /&gt;&lt;br /&gt;We are all new to Liferay at some point. I&amp;#39;m been at this for nearly  decade and I still learn something new almost every day &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;.&lt;br /&gt;&lt;br /&gt;The first step is to figure out which tag is being used. You mentioned it was a clay taglib, but not which exactly. if you can figure that out and share first, then we can take it from there. </summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-04-15T13:54:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: Clay UI dropdown direction?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113225243" />
    <author>
      <name>Jason Chee</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113225243</id>
    <updated>2019-04-15T08:02:48Z</updated>
    <published>2019-04-15T08:02:48Z</published>
    <summary type="html">Thanks Andrew. As I&amp;#39;m fairly new to Liferay, I&amp;#39;ve never done a fragment hook before.&lt;br /&gt;&lt;br /&gt;How would you go about doing that using Eclipse?</summary>
    <dc:creator>Jason Chee</dc:creator>
    <dc:date>2019-04-15T08:02:48Z</dc:date>
  </entry>
</feed>
