November Happy Hour will be moved to Thursday December 5th.

Find all page and block References where a particular page has been referenced

Vote:
 

Suppose, I have page with ID 123 and this page has been referenced on more than one pages and if one of page conatins a complex field having these fields

  1. Name
  2. Description
  3. CTA text
  4. CTA Link and this link is a contentReference and referring to  page with ID 123.

But when i am using this line of code to find all reference of pages, I'm not getting this page with above complex field. Can anyone please help me on this

 var oldPageIdReferenceList = _contentRepository.Service.GetReferencesToContent(oldIdReference, false);

#305448
Jul 20, 2023 12:30
Manoj Kumawat - Jul 21, 2023 8:57
Do you have indexed it with Find?
Vote:
 

Hi Guarav,

If I understand you correctly you are trying to find the pages that a specific pages is used or referenced too?

If that is the case you can use the IContentModelUsage to retrieve the content usage and then you can find all the reference to that content also.

Check out the code in Nicola Ayan's CmsAudit, it should point you in the right direction.

CmsAuditor

Paul

#305451
Jul 20, 2023 18:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.