Umbraco version 6.1, Visual Studio 2010
I'm trying to get a list of NewsArticles under the News folder in Umbraco i.e.
-News
--NewsArticle1
--NewsArticle2
My code is
var docType = "DocumentTypeName";
var parNode = Umbraco.TypedContentSingleAtXPath("//" + docType);
List<IPublishedContent> child = parNode.Children.ToList();
When this line is hit
var parNode = Umbraco.TypedContentSingleAtXPath("//" + docType);
It always gives me the wrong parNode (parent node that is) id. It finds the correct Doc Type (as if i change the name i get an error).
I've tried rebuilding, cleaning the project but it doesnt work. Other folders using the same code work so i dont know where or whats going wrong?
Any thoughts?