Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

extending the dependentpages function to include links from dataobjects


Go to End


1118 Views

Avatar
forthosewhofeartomorrow

Community Member, 2 Posts

16 July 2016 at 7:45am

Edited: 16/07/2016 7:46am

hello all. facing a usability question here - trying to figure this out...

i've created a dataobject called RelatedPages, and it's added as a gridfield to our blog/article/resources pages. it's sole purpose is to link to a related page, and pull content accordingly. It uses the SiteTree property in the array.

The problem is when some pages get decommissioned, i have to manually go through and reset the relatedpage for every page that linked to the decommissioned page. what i'm looking for is functionality similar to DependentPages, wherein a page will display *all* links to said page, not just from Redirectors or content links.

However, this function is buried in SiteTree.php, so I'm apprehensive. How best to move forward with this? Is there a module? Googling "DependentPages dataobject" yielded nothing.