Last active
May 21, 2016 20:31
-
-
Save svendahlstrand/9354182 to your computer and use it in GitHub Desktop.
Koncept: adress till användarens profilsida i SiteVisions Social Collaboration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var profileUrl = (function (request) { | |
var utils = request.getAttribute('sitevision.utils'); | |
var propertyUtil = utils.getPropertyUtil(); | |
var portletContextUtil = utils.getPortletContextUtil(); | |
var identity = request.getParameter('identity'); | |
var currentPageUrl = propertyUtil.getString(portletContextUtil.getCurrentPage(), 'URL'); | |
if (!identity) { | |
var user = portletContextUtil.getCurrentUserIdentity(); | |
identity = user && user.getIdentifier(); | |
} | |
return identity && (currentPageUrl + '?identity=' + identity); | |
}(request)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if ($profileUrl) | |
<input type="text" value="$profileUrl" /> | |
#end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment