Accessing page Content fields from the API

Support CreateStudios asked on August 8, 2022 05:46

Hi, I'm retrieving a list of pages with the Page retriever and need to access a custom field on the page type of the pages. When I try to accessing it using

myTreeNode.GetBoolValue("ExcludeFromSiteMap", false);

It never returns the value. I know this was straight forward in <12 but are there additional steps I need to take to load the page data up so it can be accessed from a TreeNode? I have included the DocumentForeignKey in the list of columns the page retriever returns but that didn't help.

Any suggestions would be great!

Many thanks

Recent Answers


Dmitry Bastron answered on August 8, 2022 10:57

Hi,

Could you please the full code on how you retrieve the pages?

0 votesVote for this answer Mark as a Correct answer

Support CreateStudios answered on August 9, 2022 01:14

Hi, Thank you for your interest in the question. I ended up switching from using the page retriever to using the TreeProvider to return a list that include the Pagetype values. Many thanks!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.