<?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>URL Parameter in Web Content</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111625878" />
  <subtitle>URL Parameter in Web Content</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111625878</id>
  <updated>2026-04-04T13:29:09Z</updated>
  <dc:date>2026-04-04T13:29:09Z</dc:date>
  <entry>
    <title>RE: URL Parameter in Web Content</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111643064" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111643064</id>
    <updated>2018-11-22T18:38:43Z</updated>
    <published>2018-11-22T18:38:43Z</published>
    <summary type="html">&lt;p&gt;In the absense of a better way to do it, you could use the following
  code I think --&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;
&amp;lt;#assign serviceContext = staticUtil[&amp;quot;com.liferay.portal.kernel.service.ServiceContextThreadLocal&amp;quot;].getServiceContext()&amp;gt;
&amp;lt;#assign httpServletRequest = serviceContext.getRequest()/&amp;gt;
&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;That will give you the real request object. From there you should be
  able to use the portalUtil to get the original request object, query
  string and all. Out of curiosiy though, how are you linking to the
  page? and how is the GUID determined? If it something that is
  consistent, then it might be better to use a service to pull it from
  storage rather than use the approach I listed above. &lt;/p&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2018-11-22T18:38:43Z</dc:date>
  </entry>
  <entry>
    <title>URL Parameter in Web Content</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111625877" />
    <author>
      <name>Jason Roscoe</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111625877</id>
    <updated>2018-11-21T12:37:43Z</updated>
    <published>2018-11-21T12:37:43Z</published>
    <summary type="html">&lt;p&gt;We are using Liferay DXP 7.0 and I was wondering if it is possible to
  have some web content on a page, that gets a URL parameter and appends
  that to a URL in our content.  For example, lets say we havea page
  that has the below web content on the page:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Click here to go to our partner site.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;When you intially come to the page, you would come to it with a guid
  in the URL, like www.xyz.com?guid=12345.  In the web content above,
  I would like the &amp;quot;Click here&amp;quot; to be an actual link to
  another site (www.abc.com?guid=12345), and we pass the guid that was
  in our original page url.&lt;/p&gt;
&lt;p&gt;Does anyone know how can this be done?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</summary>
    <dc:creator>Jason Roscoe</dc:creator>
    <dc:date>2018-11-21T12:37:43Z</dc:date>
  </entry>
</feed>
