【发布时间】:2014-11-19 10:52:39
【问题描述】:
我有一个块显示在我的主博客页面 (/blog) 和各个博客页面本身上。
我希望该块继续显示在主博客页面上而不是在单个博客页面上。
例如,该块应显示在 - this page 而不是 this page。
块.PHP如下:
<?php
$path = isset($_GET['q']) ? $_GET['q'] : '<front>';
$link = url($path, array('absolute' => TRUE));
$findme = 'blog';
$pos = strpos($link, $findme);
if ($pos !== false) {
RETURN TRUE;
}
$node = node_load(arg(1));
if($node->type == 'blog') {
return TRUE;
}
?>
【问题讨论】: