$content = $Chunk->getContent(); break; case 'snippet': break; case 'placeholder': break; case 'link': break; } // Fake template for presentation $modx->resource = $modx->newObject('modResource'); $modx->resource->Template = $modx->newObject('modTemplate'); $modx->resource->Template->set('content', $content); } elseif ($hash) { $tag = $modx->cacheManager->get('tags/' . $hash, $Bloodline::$cache_opts); $Bloodline->info('Tag ' . $Bloodline->neutralize($tag), ''); // Fake template for presentation $modx->resource->Template = $modx->newObject('modTemplate'); $modx->resource->Template->set('content', $tag); $content = $tag; } elseif (isset($modx->resource->Template)) { // Static templates behave differently if ($modx->resource->Template->get('static')) { // We can't use getContent because it parses the tags before we've had a chance to look at them $content = $modx->resource->Template->getFileContent(); } else { $content = $modx->resource->Template->get('content'); } } else { $content = $modx->resource->get('content'); }