我正在使用 MODx revo。我编写了一个名为 putBoxId 的片段,其内容如下:
<?php
$id = isset($_GET['id']) ? $_GET['id'] : null;
if (!is_null($id)) {
return $modx->getChunk($tpl, array('id' => $id));
}
return '';
我这样使用它:([[~3[[!putBoxId? &tpl='boxIdUrl']] ]]
当然是反引号),其中 boxIdUrl 是具有以下内容的块:
? &id=`[[+id]]`
问题是,由于某种原因,它被缓存了。我试着把'!在所有组合中,仍然会被缓存。如何解决这个问题?