How to get current Share site url using javascript?
Alfresco share has lot util methods to make front-end developer like easier.
For example, when you're in a site, and you want to navigate certain pages within the site, then you can use the below script to get the relative url for that page.
When the user wants to navigate to the document library page,
var docLibUrl = Alfresco.util.siteURL("documentlibrary");
If you print (console.log) or alert then you can get the output like,
"/share/page/site/demosite/documentlibrary"
Note: Currently I'm in demosite.Hope this helps someone.
No comments:
Post a Comment