This makes sence. The Alias is jsut an extra name that the page will respond to but the main url is still the original url. If you want all the links to use a alternate url from the name of the page then you need to use umbracoUrlName instead witch changes the acctual page url instead of jsut adding an alternate one.
Content Picker and umbracoUrlAlias
Hi guys,
I am using a content picker on a macro, and the pages I am linking to have certain umbracoUrlAlias.
When entering the page through the link, the page "looses" its umbracoUrlAlias.
In other words, the content picker ignores the umbracoUrlAlias.
This is my code:
<xsl:param name="currentPage"/>
<xsl:variable name="source" select="/macro/source"/>
<xsl:template match="/">
<!-- The fun starts here -->
<ul id="mycarousel" class="jcarousel-skin-tango">
<xsl:for-each select="umbraco.library:GetXmlNodeById(1473)//* [@isDoc][not(umbracoNaviHide = 1)][not(self::RelatedFile)]">
<li>
<div class="folio-thumb">
<xsl:if test="string(link) != ''">
<a class="" href="{umbraco.library:NiceUrl(link)}">
<img class="" src="{./listItemImg}" alt="{listItemImgAlt}" title="{listItemImgTitle}" />
</a>
</xsl:if>
</div>
<h5>
<a class="" href="{umbraco.library:NiceUrl(link)}">
<xsl:value-of select="listItemTitle" disable-output-escaping="yes"/>
</a>
</h5>
<a class="Quick-Pick-Text" href="{umbraco.library:NiceUrl(link)}">
<xsl:value-of select="listItemText" disable-output-escaping="yes"/>
</a>
</li>
</xsl:for-each>
</ul>
</xsl:template>
How do I make the content picker to display the url as it is set in umbracoUrlAlias?
Thank you in advance,
Yael
This makes sence. The Alias is jsut an extra name that the page will respond to but the main url is still the original url. If you want all the links to use a alternate url from the name of the page then you need to use umbracoUrlName instead witch changes the acctual page url instead of jsut adding an alternate one.
Hi Jeremy,
I did not know this, thanks for letting me know.
The umbracoUrlName isn't what I need but thank you anyway!
Hi Yael,
You should be able to do what you want, though it'll take a little more work... here's how to do it:
Please note that this does not take multiple URL aliases into account (you'd need to grab the first if you're using multiple aliases).
You'll also need to add '.aspx' to the concat() if you're not using directory URLs (which you should :-)
/Chriztian
Yes, it worked!
Chriztian, You're awsome :)
Thank you so much!
is working on a reply...