Liferay is designed to be standards-compliant and highly interoperable. Connect Liferay DXP with external systems using SOAP, REST, GraphQL, and more to unite third-party software, legacy systems, and data.
Headless APIs, Remote Apps (Client Extensions), API Builder, and integrations with SSO platforms are some of the examples of the features in this area.
Check these articles for an introduction:
テンプレート処理中にエラーが発生しました。
When calling macro "displayResourceTypeTags", required parameter "taxonomyCategoryBriefs" (parameter #1) was specified, but had null/missing value. ---- Tip: If the parameter value expression on the caller side is known to be legally null/missing, you may want to specify a default value for it with the "!" operator, like paramValue!defaultValue. ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #macro displayResourceTypeTags taxono... [in template "8911408109993434201#23484949#23489037" in macro "displayResourceTypeTags" at line 1, column 1] - Reached through: @displayResourceTypeTags taxonomyCate... [in template "8911408109993434201#23484949#23489037" at line 72, column 81] ----
1<#macro displayResourceTypeTags
2 taxonomyCategoryBriefs
3>
4 <#if taxonomyCategoryBriefs?has_content>
5 <#list taxonomyCategoryBriefs as taxonomyCategoryBrief>
6 <#assign taxonomyVocabulary = taxonomyCategoryBrief.embeddedTaxonomyCategory.parentTaxonomyVocabulary.externalReferenceCode!"N/A" />
7
8 <#if stringUtil.equals(taxonomyVocabulary, "RESOURCE_TYPE")>
9 <span class="font-weight-normal label label-inverse-light label-secondary m-0 px-2 text-paragraph-sm">
10 ${taxonomyCategoryBrief.taxonomyCategoryName}
11 </span>
12 </#if>
13 </#list>
14 </#if>
15</#macro>
16
17<#function getValue contentString end start>
18 <#assign startIndex = contentString?index_of(start) />
19
20 <#if startIndex == -1>
21 <#return "" />
22 </#if>
23
24 <#assign
25 substring = contentString?substring(startIndex + start?length)
26 endIndex = substring?index_of(end)
27 />
28
29 <#if endIndex == -1>
30 <#return substring />
31 </#if>
32
33 <#return substring?substring(0, endIndex)?trim />
34</#function>
35
36<div class="search-results" id="searchResults">
37 <#if entries?has_content>
38 <#list entries as searchEntry>
39 <#assign
40 className = searchEntry.getClassName()!""
41 classPK = searchEntry.getClassPK()!""
42 searchEntryContent = searchEntry.getContent()!languageUtil.get(locale, "no-content-preview", "No content preview")
43 searchEntryTitle = searchEntry.getTitle()!""
44 />
45
46 <#if searchEntryTitle?has_content>
47 <div class="align-items-stretch pb-4 search-results-entry">
48 <a class="font-weight-bold search-results-entry-title text-decoration-none unstyled" href="${searchEntry.getViewURL()}&highlight=${htmlUtil.escape(searchResultsPortletDisplayContext.getKeywords()?url('ISO-8859-1'))}">
49 <div class="d-flex justify-content-between search-results-entry-header">
50 ${searchEntryTitle}
51 <div class="search-results-entry-tags">
52 <#if className?contains("com.liferay.journal.model.JournalArticle")>
53 <#assign
54 content = searchEntryContent
55 structuredContent = restClient.get("/headless-delivery/v1.0/structured-contents/" + classPK + "?fields=taxonomyCategoryBriefs&nestedFields=embeddedTaxonomyCategory") />
56
57 <#if structuredContent??>
58 <@displayResourceTypeTags taxonomyCategoryBriefs = structuredContent.taxonomyCategoryBriefs />
59 </#if>
60 <#elseif className?contains("com.liferay.object.model.ObjectDefinition")>
61 <#assign
62 content = getValue(entry.getContent(), " end:", "content:")
63 knowledgeArticle = restClient.get("/c/p2s3knowledgearticles/" + classPK + "?nestedFields=embeddedTaxonomyCategory") />
64
65 <#if knowledgeArticle??>
66 <#if knowledgeArticle.legacy?? && knowledgeArticle.legacy == true>
67 <span class="font-weight-normal label label-secondary label-inverse-light m-0 px-2 text-paragraph-sm">
68 <@liferay_ui["message"] key="legacy" />
69 </span>
70 </#if>
71
72 <@displayResourceTypeTags taxonomyCategoryBriefs = knowledgeArticle.taxonomyCategoryBriefs />
73 </#if>
74 </#if>
75 </div>
76 </div>
77
78 <div class="description search-results-entry-content">
79 <#if className?contains("com.liferay.journal.model.JournalArticle")>
80 ${searchEntryContent}
81 <#else>
82 ${getValue(searchEntryContent, " end:", "content:")}
83 </#if>
84 </div>
85
86 <#if searchEntry.getPublishedDateString()?has_content>
87 <div class="pt-2 published-date">
88 ${languageUtil.get(locale, "published-date")}: ${searchEntry.getPublishedDateString()}
89 </div>
90 </#if>
91 </a>
92 </div>
93 </#if>
94 </#list>
95 <#else>
96 <p class="search-results-empty">
97 ${languageUtil.format(locale, "no-results-were-found-that-matched-the-keywords-x", htmlUtil.escape(searchResultsPortletDisplayContext.getKeywords()), false)}
98 </p>
99 </#if>
100</div>
101
102<style>
103 .label-inverse-light {
104 background-color: var(--color-state-neutral-lighten-2);
105 border-color: var(--color-state-neutral-lighten-2);
106 color: var(--color-neutral-8);
107 }
108
109 .search-results-entry-tags {
110 display: flex;
111 gap: 0.5rem;
112 }
113</style>
Capabilities
Product
Education
Knowledge Base
Contact Us