I have a Template for Page and in my layout, I have provided placeholder let’s say for example
I am previewing my page and trying to debug my component view of the
Header, I am trying to get the
Header item object and it’s fields associated with it.
I am always getting the page item. Basically, I would like to know how to get the associated component items inside the page?
var item = Sitecore.Context.Item["Header"];
This returns null
var item = Sitecore.Context.Item
This returns the page item.
However, I would like to get my component item
Could you help me with some guidance?