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'm trying to pick up a node from supplied id so I use new Node() and new DynamicNode
However none of it is working. See the code:
@helper GetPriceRecursive(string nodeId) { int ni = Convert.ToInt32(nodeId); umbraco.NodeFactory.Node node = new umbraco.NodeFactory.Node(ni); @nodeId @(ni) <i>a</i> @node.Id <i>b</i> umbraco.MacroEngines.DynamicNode node1 = new umbraco.MacroEngines.DynamicNode(ni); @node1.Id }
@ni and @nodeId display correct numeric value, eg. 1700
But then @node.Id and @node1.Id display 0
I sue both in my UmbracoTemplatePage view
Any ideas?
Hi Eva,
Before looking at your specific issue, why are you trying to use the legacy NodeFactory and DynamicNode in a MVC UmbracoTemplatePage View?
We have IPublishedContent and DynamicPublished content for rendering published content now...?
Jeavon
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Strange... Node and DynamicNode don't read id
I'm trying to pick up a node from supplied id so I use new Node() and new DynamicNode
However none of it is working. See the code:
@ni and @nodeId display correct numeric value, eg. 1700
But then @node.Id and @node1.Id display 0
I sue both in my UmbracoTemplatePage view
Any ideas?
Hi Eva,
Before looking at your specific issue, why are you trying to use the legacy NodeFactory and DynamicNode in a MVC UmbracoTemplatePage View?
We have IPublishedContent and DynamicPublished content for rendering published content now...?
Jeavon
is working on a reply...