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
Hi
i am using umbrraco 7.2.4 , i need to get data using umbracoHelper.TypedContentAtXPath but unable to get data.
kindly see below , what i am missed ? :(
OR is ther any other way to get node or data from url using UmbracoHelper
can any body help on this
Thanks in advance
Regards
Mehul Gajjar.
Hi Mehul,
Try to use $root variable, like that $root//go-further, where is your node go-further placed ?
Did you loot at umbraco.config, it's easy to write xpath when you are looking at xml content.
Thanks, Alex
Hi Alex
Thanks for reply , i am using below function still not get any luck
public static IPublishedContent GetNode()
{
var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
var rootNode = umbracoHelper.TypedContentSingleAtXPath("$root//go-further"));
return rootNode;
}
"go-futher" is my text page of umbraco starter kit it is in content
Kindly help on this.
Hi ,
i have found the solution as below
var umbracoHelper = new Umbraco.Web.UmbracoHelper(UmbracoContext.Current); IEnumerable<IPublishedContent> node2 = umbracoHelper.TypedContentAtXPath("//*[@urlName='go-further']");
by this way you can query on umbraco helper to get node.
Cheers.
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
Unable to get content using umbracoHelper.TypedContentAtXPath
Hi
i am using umbrraco 7.2.4 , i need to get data using umbracoHelper.TypedContentAtXPath but unable to get data.
kindly see below , what i am missed ? :(
OR is ther any other way to get node or data from url using UmbracoHelper
can any body help on this
Thanks in advance
Regards
Mehul Gajjar.
Hi Mehul,
Try to use $root variable, like that $root//go-further, where is your node go-further placed ?
Did you loot at umbraco.config, it's easy to write xpath when you are looking at xml content.
Thanks, Alex
Hi Alex
Thanks for reply , i am using below function still not get any luck
public static IPublishedContent GetNode()
{
var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
var rootNode = umbracoHelper.TypedContentSingleAtXPath("$root//go-further"));
return rootNode;
}
"go-futher" is my text page of umbraco starter kit it is in content
Kindly help on this.
Regards
Mehul Gajjar.
Hi ,
i have found the solution as below
by this way you can query on umbraco helper to get node.
Cheers.
Regards
Mehul Gajjar.
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.