Hi All,
I am trying to get all the culture variances using the KenticoAPI for a specific page.
I have a page with two culture variances of it, for example sake the page name is "DemoPage" and it exists in both english (en-EN) and spanish (es-ES).
Below is the code snippit that I am using.
var pages = new TreeProvider().SelectNodes() .WhereEquals("NodeName","DemoPage") .OnSite(siteId).Execute();
When I execute the code I always get an dataset back that contains only one record , where I would expect two records one for English and one for Spanish
Regards
Hi,
try including AllCultures() which ensures retrieval of all cultural versions!
AllCultures()
Something like
new CMS.DocumentEngine.TreeProvider() .SelectNodes() .WhereEquals("NodeName","Home") .OnSite(1) .AllCultures()
Hi David,
Thanks, Its working I just added the AllCultures() and it worked.
Regards,
Please, sign in to be able to submit a new answer.