<?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>Groovy language - change staging friendly url</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121404474" />
  <subtitle>Groovy language - change staging friendly url</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121404474</id>
  <updated>2026-10-15T11:35:50Z</updated>
  <dc:date>2026-10-15T11:35:50Z</dc:date>
  <entry>
    <title>RE: Groovy language - change staging friendly url</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121428913" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121428913</id>
    <updated>2022-05-24T21:32:53Z</updated>
    <published>2022-05-24T21:32:52Z</published>
    <summary type="html">&lt;p&gt;Hi Brody, try getting the stagingGroup from the group with the siteId
  you have, and changing its friendly URL:&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;import com.liferay.portal.kernel.service.*;
import com.liferay.portal.kernel.model.*;

Group site = GroupLocalServiceUtil.getGroup(SITEID);

Group stagingSite = site.getStagingGroup();

GroupLocalServiceUtil.updateFriendlyURL(stagingSite.getGroupId(), &amp;quot;/edited-guest-staging&amp;quot;);&lt;/code&gt;&lt;/pre&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2022-05-24T21:32:52Z</dc:date>
  </entry>
  <entry>
    <title>Groovy language - change staging friendly url</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121404473" />
    <author>
      <name>BRODY HIGGS JR</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121404473</id>
    <updated>2022-04-21T20:36:20Z</updated>
    <published>2022-04-21T20:36:19Z</published>
    <summary type="html">&lt;p style="margin-bottom: 11.0px;"&gt;
  &lt;span style="font-size: 11.0pt;"&gt;
    &lt;span style="line-height: 107.0%;"&gt;
      &lt;span style="font-family: Calibri , sans-serif;"&gt;I can change
        ‘Site Friendly URL’ with the Groovy language code below, but I
        would like to change ‘Staging Friendly URL’.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 11.0px;"&gt;
  &lt;span style="font-size: 11.0pt;"&gt;
    &lt;span style="line-height: 107.0%;"&gt;
      &lt;span style="font-family: Calibri , sans-serif;"&gt;import com.liferay.portal.service.GroupLocalServiceUtil;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 11.0px;"&gt;
  &lt;span style="font-size: 11.0pt;"&gt;
    &lt;span style="line-height: 107.0%;"&gt;
      &lt;span style="font-family: Calibri , sans-serif;"&gt;long liveGroupId
        = siteidhere;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 11.0px;"&gt;
  &lt;span style="font-size: 11.0pt;"&gt;
    &lt;span style="line-height: 107.0%;"&gt;
      &lt;span style="font-family: Calibri , sans-serif;"&gt;out.println(GroupLocalServiceUtil.updateFriendlyURL(siteidhere,'/sitename1-staging'))&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-bottom: 11.0px;"&gt;Reference: &lt;a
    href="https://docs.liferay.com/dxp/digital-enterprise/7.0-sp1/javadocs/portal-kernel/com/liferay/portal/kernel/service/GroupLocalServiceUtil.html?msclkid=93337fefc1b211ecaa2c552b13546bb4"&gt;GroupLocalServiceUtil
    (Liferay 7.0.10 portal-kernel API)&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:creator>BRODY HIGGS JR</dc:creator>
    <dc:date>2022-04-21T20:36:19Z</dc:date>
  </entry>
</feed>
