Panel |
---|
borderColor | #0081C0 |
---|
titleColor | #0081C0 |
---|
|
The Alternative URL setting was introduced in XperienCentral version R29. |
For web pages, you can create an alternative URL that directly links to that page. A web page can have multiple alternative URLs. The advantage of an alternative URL is that you can make it whatever you want as long as it's unique and the link will lead directly to that page. Note that when a visitor follows the alternative link to the page, they will see the main friendly URL in the Address field of their browser and not the alternative friendly URL.
To add an alternative friendly URL, follow these steps:
- Enter a string in the "Add Alternative URL" text field.
(XperienCentral versions R38 and higher) Select "Canonical" if you want the Alternative URL to be canonical. Only one URL can be designated as the canonical URL. If another URL is already claiming the canonical designation, you must first delete it before you can define another URL as canonical.
Expand |
---|
title | Retrieving the canonical url from a JSP: code implementation |
---|
|
For pages: Code Block |
---|
| <wm:callService var="canonicalURL" serviceName="nl.gx.webmanager.services.seo.SEOService" methodName="getCanonicalURL">
<wm:argument type="nl.gx.webmanager.cms.core.PageVersion" value="${presentationcontext.pageVersion}" />
</wm:callService> |
For mediaItems: Code Block |
---|
| <wm:callService var="canonicalURL" serviceName="nl.gx.webmanager.services.seo.SEOService" methodName="getCanonicalURL">
<wm:argument type="nl.gx.webmanager.cms.core.PageVersion" value="${presentationcontext.mediaitem.current}" />
</wm:callService> |
Or both: Code Block |
---|
| <c:set var="canonicaURL" value=""/>
<c:choose>
<c:when test="${not empty presentationContext.mediaItem}">
<wm:callService var="canonicalURL" serviceName="nl.gx.webmanager.services.seo.SEOService" methodName="getCanonicalURL"> <wm:argument type="nl.gx.webmanager.cms.core.PageVersion" value="${presentationcontext.mediaitem.current}" /> </wm:callService>
</c:when>
<c:otherwise>
<wm:callService var="canonicalURL" serviceName="nl.gx.webmanager.services.seo.SEOService" methodName="getCanonicalURL"> <wm:argument type="nl.gx.webmanager.cms.core.PageVersion" value="${presentationcontext.pageVersion}" /> </wm:callService>
</c:otherwise>
</choose> |
|
- Click [Save]. The Alternative URL will be added and it will appear next to "This page is also available at URLs". Note that alternative friendly URLs will be standardized just as all other friendly URLs are and that is what you will see in the Alternative URLs list.
To delete an alternative friendly URL, select the "Delete" checkbox to the right of it and then click [Save].