<?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>Displaying new type article field in web content template (7.2 GA2 CE)</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118092078" />
  <subtitle>Displaying new type article field in web content template (7.2 GA2 CE)</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118092078</id>
  <updated>2026-04-04T15:47:55Z</updated>
  <dc:date>2026-04-04T15:47:55Z</dc:date>
  <entry>
    <title>Displaying new type article field in web content template (7.2 GA2 CE)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118092077" />
    <author>
      <name>Fernando Fernandez</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118092077</id>
    <updated>2019-12-16T16:24:25Z</updated>
    <published>2019-12-16T16:24:25Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi guys,&lt;br&gt;I'm using for the first time a field of type "Article" in a structure. Editing a web content with such a field works well, so now we must display it in a template.&lt;br&gt;The first problem seems to be that the web content template editor is not providing working code for this article. It's generating an invalid URL, since&amp;nbsp; getFriendlyUrl() is not working:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;webContentData = jsonFactoryUtil.createJSONObject(DirectionsArticle.getData())
/&amp;amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;a href="${DirectionsArticle.getFriendlyUrl()}"&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;${webContentData.title}
&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;Anyway, what I would like to do is to display the article using &amp;lt;@liferay_journal["journal-article"] articleId=...&amp;nbsp; groupId=... /&amp;gt;. But the getData() method is only providing the className, classPK and title.&amp;nbsp;&lt;br&gt;Does anybody know if&amp;nbsp; there is a faster way to get to the article than&amp;nbsp;using serviceLocator, JournalArticleServiceUtil and&amp;nbsp;getArticleDisplay() ?&amp;nbsp;&lt;br&gt;TIA&lt;br&gt;Fernando&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Fernando Fernandez</dc:creator>
    <dc:date>2019-12-16T16:24:25Z</dc:date>
  </entry>
</feed>
