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
RE: Add /c/portal/logout to sitemap.json
Hello everybody,
I'm currently trying to install the logout via the navigation, because I do not show the dockbar.
I tried to put the link /c/portal/logout in my sitemap.json, but that
did not work.
I also tried to log out via the
com_liferay_login_web_portlet_LoginPortlet, but it did not work either.
I would like to add the logout url in my sitemap.json, but currently I don't know how or even if it's possible.
Best regards and thanks in advance!
Lukas
Does nobody know an answer?
I start my liferay-tomcat currently locally and try to install the logout in the sitemap.json.
I'm just trying to call localhost:8080/c/portal/logout via the navigation.
I tried few things like:
Thanks in advance!
I start my liferay-tomcat currently locally and try to install the logout in the sitemap.json.
I'm just trying to call localhost:8080/c/portal/logout via the navigation.
I tried few things like:
"linkToPageURL": "/c/portal/logout",
"url": "/c/portal/logout",
"link": "/c/portal/logout",
"type": "/c/portal/logout",
... but nothing worked.Thanks in advance!
I start my liferay-tomcat currently locally and try to install the logout in the sitemap.json.
Which version of Liferay? Do you have a sample theme with the resources importer folder already set up to assist people who might be interested in helping you without too much of a time commitment to finding an answer?
With that being said, the documentation for Liferay 7.0 in Importing Resources with a Theme provides the following example for URL page types:
{
"friendlyURL": "/url-page",
"name": "URL Page",
"title": "URL Page",
"type": "url"
},
Assuming the documentation is mostly correct but is incomplete (the URL page types are resolved using typeSettings), I would try setting the url variable in typeSettings. This is based on the idea that the portal property value for layout.url for the url layout type (reference), and that PortalImpl.getLayoutURL populates the variables using the properties set to typeSettings.
That would look like this:
{
"friendlyURL": "/logout",
"name": "Logout",
"title": "Logout",
"type": "url",
"typeSettings": "url=/c/portal/logout"
},