Get themeDisplay object from rest moduleGet themeDisplay object from rest modulehttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1200272482024-03-28T22:23:37Z2024-03-28T22:23:37ZRE: Get themeDisplay object from rest moduleNikita Laitinenhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1200349512020-10-02T11:19:51Z2020-10-02T11:19:51ZGood ideas!<br /><br />I noticed that these scripts are loaded in html -> common -> themes - > top_js.jsp. The start point is layout object and I thought I can use ThemeDisplay to get layout and then achieve scripts like it is described in that file<br /> Nikita Laitinen2020-10-02T11:19:51ZRE: Get themeDisplay object from rest moduleNikita Laitinenhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1200342532020-10-02T11:12:38Z2020-10-02T11:12:38Zthe reason is following<br />User click on a button on the website and I want to get some script from Configuration -> site settings -> Advanced -> Analytics section and paste it in the header section of HTML<br /> Nikita Laitinen2020-10-02T11:12:38ZRE: Get themeDisplay object from rest moduleOlaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1200283532020-09-30T10:43:21Z2020-09-30T10:43:21Z<div class="quote-title">Nikita Laitinen:</div><blockquote><br />I have a problem with getting themeDisplay object from rest liferay module.<br />...<br />I need it to get analyticsScripts from the Configuration -> site settings -> Advanced -> Analytics section. Get them all and return them as a response of rest call.<br /></blockquote><br />There's your actual question: You need the configuration values, not the ThemeDisplay. <br />I'd check the module that holds this configuration, see what's exported and what API is available. <br />You can either load the same configuration if everything is exported (e.g. by referencing it with the name it's registered) or access the API to query for the values you need.<br />ThemeDisplay is a concept for <em>pages</em> served by Liferay - and a REST call is not for a page, has no theme, etc - thus the subject clearly points to a <a href="http://xyproblem.info/">XY-Problem</a> that you shouldn't persue any longer.Olaf Kock2020-09-30T10:43:21ZRE: Get themeDisplay object from rest moduleMohammed Yasinhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1200280002020-09-30T10:25:47Z2020-09-30T10:25:47ZHi,<br />Can you pls let us know the reason for themeDisplay Object in Rest ? , Also if your looking for User or Request related objects you can check out the below link it might help you <br /><a href="https://liferay.dev/blogs/-/blogs/rest-custom-context-providers">https://liferay.dev/blogs/-/blogs/rest-custom-context-providers</a>Mohammed Yasin2020-09-30T10:25:47ZGet themeDisplay object from rest moduleNikita Laitinenhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1200272472020-09-30T08:50:26Z2020-09-30T08:50:26Z<html><head></head><body>Hello! Could you help me please<br>I have a problem with getting themeDisplay object from rest liferay module.<br><br><pre><code>@GET</code></pre><pre><code>@Path("/evening")</code></pre><pre><code>@Produces("text/plain")</code></pre><pre><code>public String helloevening() {</code></pre><pre><code>// Here I need to get themeDisplay object</code></pre><pre><code>return "Good evening!";</code></pre><pre><code>}
</code></pre>I need it to get analyticsScr