Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

create a PortletURL in PHP

View portlet_url.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<?php
/*
* You need the fix from:
* http://issues.liferay.com/browse/LPS-22161
* (git 8f7c48746f9282e6037112220f9232786747d896)
*/
import com.liferay.portal.kernel.util.WebKeys;
import com.liferay.portal.util.PortletKeys;
import com.liferay.portlet.PortletURLFactoryUtil;
import javax.portlet.PortletMode;
import javax.portlet.PortletRequest;
import javax.portlet.WindowState;
$request = quercus_servlet_request();
$themeDisplay = $request->getAttribute(WebKeys::THEME_DISPLAY);
$myAccountURL = PortletURLFactoryUtil::create(
$request, PortletKeys::MY_ACCOUNT, $themeDisplay->getPlid(),
PortletRequest::RENDER_PHASE);
$myAccountURL->setWindowState(WindowState::MAXIMIZED);
$myAccountURL->setPortletMode(PortletMode::VIEW);
$myAccountURL->setParameter("struts_action", "/my_account/edit_user");
?>
 
<a href="<?php echo $myAccountURL->toString(); ?>">My Account</a>
 
<?php include("navigation.php"); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.