Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to generate Add web content URL in asset publisher widget template?
I have created widget template for asset publisher and now I want to create add web content URL to create link for adding a web content of my news structure.
I have created a custom URL as below but due to the p_p_id it is
showing error of you dont roles to access this portlet though I have
logged in as a site administrator.
<#assign addNewsURL = URL + '/~/control_panel/manage?p_p_id=com_liferay_journal_web_portlet_JournalPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_journal_web_portlet_JournalPortlet_mvcPath=%2Fedit_article.jsp&_com_liferay_journal_web_portlet_JournalPortlet_redirect=/group${themeDisplay.getScopeGroup().getFriendlyURL()}/home&_com_liferay_journal_web_portlet_JournalPortlet_ddmStructureId=${structureId}&_com_liferay_journal_web_portlet_JournalPortlet_folderId=0&_com_liferay_journal_web_portlet_JournalPortlet_groupId=${groupId}&_com_liferay_journal_web_portlet_JournalPortlet_showSelectFolder=false&p_p_auth='+p_p_auth>
However, same URL is working fine with super admin role.
Can someone kindly suggest to generate the URL to add the web
content in liferay 7.4 freemarker asset publisher widget template.
Thanks in advance..
Powered by Liferay™