Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ function __construct(modX &$modx,array $config = array()) {
$this->modx =& $modx;

$this->config = array_merge(array(
/**
* Document ID for which to generate Crumbs
*
* @var integer $docId
*/
'docId' => $modx->resource->get('id'),
/**
* Max number of elements to have in a path. 100 is an arbitrary
* high number. If you make it smaller, like say 2, but you are 5
Expand Down Expand Up @@ -262,7 +268,10 @@ public function pullResource($resourceId){
public function run() {
/* get current resource parent info */

$resource =& $this->modx->resource;
$resource = $this->config['docId'] == $this->modx->resource->get('id')
? $this->modx->resource;
: $this->pullResource($this->config['docId']);

$this->showCurrentPage($resource->get('id'));

/* assemble intermediate crumbs */
Expand Down Expand Up @@ -327,4 +336,4 @@ public function getChunk($name,array $properties = array()) {
}
return $o;
}
}
}