跳至内容
Python 俱乐部
用户工具
登录
站点工具
搜索
工具
显示页面
修订记录
反向链接
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
您的足迹:
drupal:theme:teaser
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== Drupal主题:为摘要(teaser)页面制作专门的主题模板 ====== 有下面的三种方法可以为摘要页面制作单独的主题: ===== 方法一 ===== <code php> <?php if ($teaser) { // node is being displayed as a teaser // Anything here will show up when the teaser of the post // is viewed in your taxonomies or front page } else { //all other cases //Anything here will show up when viewing your post // at any other time, e.g. previews } ?> </code> ===== 方法二 ===== <code php> <?php if ($teaser): ?> <!-- teaser template HTML here --> <?php else: ?> <!-- regular node view template HTML here --> <?php endif; ?> </code> ===== 方法三 ===== <code php> <?php if ($teaser) { //if node is being displayed as a teaser //Anything here will show up when the teaser of the post // is viewed in your taxonomies or front page } elseif ($page) { //if node is being displayed as a full node //Anything here will show up when viewing only your post } else { //all other cases //Anything here will show up when viewing your post at any other time } ?> </code> ===== 参考 ===== * http://drupal.org/node/53464
drupal/theme/teaser.txt
· 最后更改: 2010/08/23 04:28 (外部编辑)
页面工具
显示页面
修订记录
反向链接
回到顶部