and replace 'id' with the id of the 'Product' node in de content section (hover over the node and have a look at the lower left corner, should see a openContent(id)).
Is it that what you're after? If not please elaborate.
Suppose, i have the following node in a content section:-
->Product
->Sales
->Purchase
and i used a template like as:
<a id="ShowLink" href="product.aspx?">Product</a>
Here the code is work for product node, and it is ok. That means it is static for product node. But i want that code will work for every node( product, sales, purchase) using this same.
so you want all nodes 'Product', 'Sales' and 'Purchase' on the page with their corresponding hyperlinks? May need to tell a bit more on the context before we can actually give some code to put in the template.
Are these nodes part of a navigation, which you need on all pages? Please explain in greater detail, there's probably a thousand ways to do it, but depending on your needs and context, the solution may vary.
Code snippet traverses the content node starting from the requested page up to level 1 (which is the 'Content' node) and outputs all child nodes with their corresponding link and name
You must of course have an xslt file and a macro that references this xslt and put that macro onto the page. If you're not familiar with this, have a look at the intro videos on umbraco.tv for inspiration
how to get current dynamic node id in a template
Hi
Suppose, i have the following node in a content section:-
->Product
->Sales
->Purchase
and i used a template like as:
<a id="ShowLink" href="product.aspx?">Product</a>
This code is only for product node. But i want to that template is used for every templte. which i cant. can anyone help me. how to do this??
Touhid
touhid58,
use
and replace 'id' with the id of the 'Product' node in de content section (hover over the node and have a look at the lower left corner, should see a openContent(id)).
Is it that what you're after? If not please elaborate.
Cheers,
/Dirk
Hi Dirk
Thnks for reply but it doesnt work.
Suppose, i have the following node in a content section:-
->Product
->Sales
->Purchase
and i used a template like as:
<a id="ShowLink" href="product.aspx?">Product</a>
Here the code is work for product node, and it is ok. That means it is static for product node. But i want that code will work for every node( product, sales, purchase) using this same.
Touhid
so you want all nodes 'Product', 'Sales' and 'Purchase' on the page with their corresponding hyperlinks? May need to tell a bit more on the context before we can actually give some code to put in the template.
Are these nodes part of a navigation, which you need on all pages? Please explain in greater detail, there's probably a thousand ways to do it, but depending on your needs and context, the solution may vary.
Most simple solution that'll work on all pages:
Code snippet traverses the content node starting from the requested page up to level 1 (which is the 'Content' node) and outputs all child nodes with their corresponding link and name
You must of course have an xslt file and a macro that references this xslt and put that macro onto the page. If you're not familiar with this, have a look at the intro videos on umbraco.tv for inspiration
Cheers,
/Dirk
is working on a reply...