Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I've got this:
Frontpage
- Textpage 1
- Textpage 2
Textpage 1 and 2 is just created as divs on the website and the html version of the menu is like this:
<li><a href="#Forside" class="logo">Forside</a></li>
<li><a href="#Projekter">Projekter</a></li>
But when i use {umbraco.library:NiceUrl(@id)}
it automatically puts an / infront of the url so my urls looks like this:
xxx.dk/#/forside
xxx.dk/#/projekter
Is it possible to remove the first slash?
Tried with this:
<xsl:attribute name="href">#<xsl:value-of select="umbraco.library:NiceUrl(@id)"/></xsl:attribute>
It still adds like this /#/projekter
Hi Daniel,
If they're just <div> elements you should just print the same value as you're generating their IDs with (and that should probably be @urlName to be safe for use as an ID):
<a href="#{@urlName}"><xsl:value-of select="@nodeName" /></a>
<!-- Later ... --> <div id="{@urlName}"> <!-- do stuff --> </div>
/Chriztian
Thanks Chriztian - you rock! :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Removing the first slash in url?
I've got this:
Frontpage
- Textpage 1
- Textpage 2
Textpage 1 and 2 is just created as divs on the website and the html version of the menu is like this:
<li><a href="#Forside" class="logo">Forside</a></li>
<li><a href="#Projekter">Projekter</a></li>
But when i use {umbraco.library:NiceUrl(@id)}
it automatically puts an / infront of the url so my urls looks like this:
xxx.dk/#/forside
xxx.dk/#/projekter
Is it possible to remove the first slash?
Tried with this:
<xsl:attribute name="href">#<xsl:value-of select="umbraco.library:NiceUrl(@id)"/></xsl:attribute>
It still adds like this /#/projekter
Hi Daniel,
If they're just <div> elements you should just print the same value as you're generating their IDs with (and that should probably be @urlName to be safe for use as an ID):
<!-- Later ... --> <div id="{@urlName}"> <!-- do stuff --> </div>
/Chriztian
Thanks Chriztian - you rock! :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.