On the page item I have added Tabs composite component and on the tab item added Hero component and data source set from page data folder like
I am running logic on publish end event, where I am accessing the page's renderings. In this event, the context item is null, so first I set the context item to the page for which publish end event happened and then accessed rendering from the page item.
Once page-level rendering is accessed, to access further rendering from tab component I set the context item to an individual tab item and accessed tab item level rendering
The logic is used
But with the above logic, everything works fine but above-mentioned hero component which is added on tab item and data source is from page data folder, the data source path is formed from
tabitem1 data folder and not the page's data folder, so not able to resolve hero rendering's data source item.
Is there any way to access composite rendering with it's datasource? which contains "page:" as datasource?