$config = array(); $config['obj_id'] = isset($_GET['obj_id']) ? $_GET['obj_id'] : null; $config['field'] = isset($_GET['field']) ? $_GET['field'] : null; $config['type'] = isset($_GET['type']) ? $_GET['type'] : null; $hash = isset($_GET['hash']) ? $_GET['hash'] : null; $profile = isset($_GET['profile']) ? $_GET['profile'] : null; $config['markup'] = isset($_GET['markup']) ? $_GET['markup'] : array(); $config['format'] = isset($_GET['format']) ? $_GET['format'] : 'both'; // js|html|both $config['persist'] = array('BLOODLINE' => 1); $Bloodline = new Bloodline($modx, $config); // Gather info... $ctx = $modx->context->get('id') ? $modx->context->get('id') : 'web'; $Bloodline->info('Context ' . $modx->context->get('key'), MODX_MANAGER_URL . "index.php?a=5&id=0&key={$ctx}"); if (isset($modx->resource->Template)) { $Bloodline->info('Template ' . $modx->resource->Template->get('name') . ' (' . $modx->resource->Template->get('id') . ')', $Bloodline->get_mgr_url('template', $modx->resource->Template->get('id'))); } $Bloodline->info('Resource ' . $modx->resource->get('pagetitle') . ' (' . $modx->resource->get('id') . ')', $Bloodline->get_mgr_url('resource', $modx->resource->get('id'))); // Store this because $modx->resource may get overwritten... $Bloodline->resource = $modx->resource; // Here's where we drill down: we can only map tags in a few places (mostly chunks) if ($config['type']) { switch ($config['type']) { case 'tv': $content = $modx->resource->getTVValue($config['field']); break; case 'docvar': $content = $modx->resource->get($config['field']); break; case 'setting': $t['map_url'] = '';