Get the current document id in section

James Brett asked on November 19, 2019 18:11

Hi

I'm new to K12 SP.

Is it possible in K12 SP to get the current document node id from within a section properties class. I have a section where I display adverts but I need to check the current item to see if they should be displayed or not.

Cheers James

Correct Answer

Trevor Fayas answered on November 19, 2019 18:46

You should be able to call GetPage() to get the section's current page, then reference the NodeID.

https://docs.kentico.com/k12sp/developing-websites/page-builder-development/developing-page-builder-sections

1 votesVote for this answer Unmark Correct answer

Recent Answers


Development Support answered on November 19, 2019 18:46 (last edited on November 19, 2019 18:46)

0 votesVote for this answer Mark as a Correct answer

James Brett answered on November 20, 2019 16:52

Hi Trevor

Thanks for pointing me in the right direction.

Cheers James

0 votesVote for this answer Mark as a Correct answer

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