Thanks for the reply, but maybe a noob question, when I use your example I get no result, but see the code in my html-source. It seems it doesn't get rendered, should I add something?
Hmm, maybe a bit to early for my last response. I've searched for a likewise method to display the corresponding nodename, but can't find it. Can somebody still help me with that one?
write niceurl by nodeId
I am looking for a method to insert a href where the niceurl and nodename are inserted by a nodeId.
Being fairly new to Umbraco all help is appreciated.
Tips on tutorials for this kind of actions are welcome to.
Greetings Patrick
Hi Patrick. you should be able to use the following
<xsl:value-of select="umbraco.library:NiceUrl('nodeID')"/>
Replace nodeId with the integer value of the page id you want
Thanks for the reply, but maybe a noob question, when I use your example I get no result, but see the code in my html-source.
It seems it doesn't get rendered, should I add something?
My template is like this:
<%@ Master Language="C#" MasterPageFile="~/masterpages/umbMaster.master" AutoEventWireup="true" %>
<asp:content contentplaceholderid="cp_content" runat="server">
<div id="page-bgtop">
<div id="content">
<div class="post">
<h2 class="title"><span><umbraco:item runat="server" field="pageName"></umbraco:item></span></h2>
<div class="entry">
<umbraco:item runat="server" field="bodyText"></umbraco:item>
</div>
</div>
</div>
<xsl:value-of select="umbraco.library:NiceUrl('1071')"/>
<div style="clear: both; height: 1px"></div>
</div>
</asp:content>
Greetings, Patrick
ah, I thought you were putting this in an XSLT file. To get this to work in a template file (masterpage) you will need to use the following code
make sure you dont add the apostrohes around the number
Thanks, that's it.
Hmm, maybe a bit to early for my last response.
I've searched for a likewise method to display the corresponding nodename, but can't find it.
Can somebody still help me with that one?
Patrick
I think you should look at putting all of this in an XSLT file and then wire up to your master page using a macro ...
In the XSLT you will have the ability to create a variable whcih can store the XML data of a particular node
<xsl:variable name="selectedNode" select="umbraco.library:GetXmlNodeById('String id')"/>
Then you can do
<xsl:value-of select="$selectedNode/@nodeName" />
and
<a href={umbraco.library:NiceUrl($selectedNode/@id)}>something</a>
hoe that helps
is working on a reply...