Search code examples
modx

Is there a plugin to show the pages that link to a certain document?


Does anyone know of a plugin for modx that will show all the pages that link to each document ID or would I have to create my own?


Solution

  • You could write a snippet for yourself. Use the code

    $weblinkArray = $modx->getCollection('modWeblink',$criteria);

    where $criteria is the set of criteria, restrictions or constraints you want to set, like

    $criteria = array( 'published' => 1,// this is optional, more parameters can be optionally added as well )

    This gives you an array of the documents that link. Further, you know how to access data of an array.