首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

Drupal中判断当前页面替分类页的方法

2012-07-08 
Drupal中判断当前页面为分类页的方法Drupal中判断当前页面为分类页的方法MiMi Posted on 2009.11.05 00:01

Drupal中判断当前页面为分类页的方法
Drupal中判断当前页面为分类页的方法

在Drupal中,分类系统路径都是类似这种格式:

taxonomy/term/10

taxonomy/term/17

那么,根据Drupal API,判断当前页面为分类页面,可以这样写:

if ( arg(0) == ‘taxonomy’ && arg(1) == ‘term’ )?{

echo ‘这是分类’;

} else {

echo ‘这不是分类’;

}

热点排行