<?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>Liferay 7.2 CE: enable custom keys for Widget Templates</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117227646" />
  <subtitle>Liferay 7.2 CE: enable custom keys for Widget Templates</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117227646</id>
  <updated>2026-04-04T05:38:56Z</updated>
  <dc:date>2026-04-04T05:38:56Z</dc:date>
  <entry>
    <title>RE: Liferay 7.2 CE: enable custom keys for Widget Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117390471" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117390471</id>
    <updated>2019-10-07T15:17:50Z</updated>
    <published>2019-10-07T15:17:50Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;I've found that the configuration is correct, but probably Liferay has a bug.&lt;br&gt;In the images attached, you can see inside red rectangles what appears in the interface with the above configuration: a not resolved language key for structures and only a label for templates: in both cases no input text fields at all to set a custom key.&lt;br&gt;I've found a workaround with a groovy script, updating the structure/template key after their creation:&lt;br&gt;&lt;pre&gt;&lt;code&gt;def structureName = "EXISTENT-STRUCTURE";
def newStructureKey = "NEW-KEY"; def query = "UPDATE DDMStructure SET structureKey='"+newStructureKey+"' WHERE name like '%"+structureName+"%';";
def result = com.liferay.portal.kernel.dao.db.DBManagerUtil.getDB().runSQL(query); &lt;/code&gt;&lt;/pre&gt;&lt;br&gt;and&lt;br&gt;&lt;pre&gt;&lt;code&gt;def templateName = "EXISTENT-TEMPLATE";
def newTemplateKey = "NEW-KEY"; def query = "UPDATE DDMTemplate SET templateKey='"+newTemplateKey+"' WHERE name like '%"+templateName+"%';";
def result = com.liferay.portal.kernel.dao.db.DBManagerUtil.getDB().runSQL(query);
&lt;/code&gt;&lt;/pre&gt;---&lt;br&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: I've opened a &lt;a href="https://issues.liferay.com/browse/LPS-103010"&gt;related bug to this&lt;/a&gt;.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2019-10-07T15:17:50Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE: enable custom keys for Widget Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117357057" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117357057</id>
    <updated>2019-10-04T15:49:32Z</updated>
    <published>2019-10-04T15:49:32Z</published>
    <summary type="html">I&amp;#39;ve just realized that the above configuration works only for Widget Templates...for Web Content Structures and Templates does not work and keys continue to be autogenerated. Any suggestions? Thank you</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2019-10-04T15:49:32Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE: enable custom keys for Widget Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117228629" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117228629</id>
    <updated>2019-09-20T12:29:29Z</updated>
    <published>2019-09-20T12:29:29Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Thank you Christoph, that's correct!&lt;br&gt;As additional info, I've exported configuration files and put them inside &lt;em&gt;osgi/configs&lt;/em&gt; directory of my application server:&lt;br&gt;&lt;ul style="list-style: disc outside;"&gt;&lt;li&gt;&lt;strong&gt;com.liferay.dynamic.data.mapping.web.configuration.DDMWebConfiguration.config&lt;/strong&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;autogenerateStructureKey="false"
autogenerateTemplateKey="false"
changeableDefaultLanguage="false"&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;com.liferay.journal.web.configuration.JournalWebConfiguration.config&lt;/strong&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;autogenerateDDMStructureKey="false"
autogenerateDDMTemplateKey="false"
changeableDefaultLanguage="false"
defaultDisplayView="descriptive"
displayViews=[ \
&amp;amp;nbsp; "icon", \
&amp;amp;nbsp; "descriptive", \
&amp;amp;nbsp; "list", \
&amp;amp;nbsp; ]
journalArticleForceAutogenerateId="true"
journalArticlesSearchWithIndex="true"
journalBrowseByStructuresSortedByName="true"
journalDDMTemplateLanguageTypes=[ \
&amp;amp;nbsp; "ftl", \
&amp;amp;nbsp; ]
journalFeedForceAutogenerateId="true"
maxAddMenuItems="7"
showAncestorScopesByDefault="false"
showFeeds="false&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2019-09-20T12:29:29Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE: enable custom keys for Widget Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117230673" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117230673</id>
    <updated>2019-09-20T11:23:26Z</updated>
    <published>2019-09-20T11:23:26Z</published>
    <summary type="html">I think, you can find the checkboxes here:&lt;br /&gt;Control Panel -&amp;gt; Configuration -&amp;gt; System Settings (Content and Data) -&amp;gt; Dynamic Data Mapping&lt;br /&gt;Control Panel -&amp;gt; Configuration -&amp;gt; System Settings (Content and Data) -&amp;gt; Web Content -&amp;gt; Administration&lt;br /&gt;Uncheck the autogenerate structure/template key checkboxes.</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2019-09-20T11:23:26Z</dc:date>
  </entry>
  <entry>
    <title>Liferay 7.2 CE: enable custom keys for Widget Templates</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117227645" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117227645</id>
    <updated>2019-09-20T10:46:17Z</updated>
    <published>2019-09-20T10:46:17Z</published>
    <summary type="html">Hi, what is the portal property in Liferay 7.2 CE that enables me to define a custom key for my Widget Templates, during their creation process?&lt;br /&gt;I was able to do that in 6.2, but I don&amp;#39;t find any reference to do it in 7.2.&lt;br /&gt;I&amp;#39;ve the same problem with Web Content Structures and Web Content Templates.&lt;br /&gt;Thank you.</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2019-09-20T10:46:17Z</dc:date>
  </entry>
</feed>
