- 浏览: 87387 次
- 性别:
- 来自: 深圳
最新评论
add this function to template.php
function phptemplate_preprocess_node(&$vars) { // If we have any terms... if ($vars['node']->taxonomy) { // Let's iterate through each term. foreach ($vars['node']->taxonomy as $term) { // We will build a new array where there will be as many // nested arrays as there are vocabularies // The key for each nested array is the vocabulary ID. $vocabulary[$term->vid]['taxonomy_term_'. $term->tid] = array( 'title' => $term->name, 'href' => taxonomy_term_path($term), 'attributes' => array( 'rel' => 'tag', 'title' => strip_tags($term->description), ), ); } // Making sure vocabularies appear in the same order. ksort($vocabulary, SORT_NUMERIC); // We will get rid of the old $terms variable. unset($vars['terms']); // And build a new $terms. foreach ($vocabulary as $vid => $terms) { // Getting the name of the vocabulary. $name = taxonomy_vocabulary_load($vid)->name; // Using the theme('links', ...) function to theme terms list. $terms = theme('links', $terms, array('class' => 'links inline')); // Wrapping the terms list. $vars['terms'] .= '<div class="vocabulary taxonomy_vid_'; $vars['terms'] .= $vid; $vars['terms'] .= '">'; $vars['terms'] .= $name; $vars['terms'] .= ': '; $vars['terms'] .= $terms; $vars['terms'] .= '</div>'; } } }
发表评论
-
内部用Drupal/PHP开发规范1.2
2011-07-19 22:11 1316前言 常言道,“没有规 ... -
drupal_get_path_alias($_GET['q'])获得当前路径
2011-05-01 02:48 869drupal_get_path_alias($_GET['q' ... -
更改imagefield的图片的alt和title值为terms和desrction
2010-09-17 17:07 1079imagefield_formatter.inc // ... -
filefield在firefox下上传文件出错http0error的解决办法
2010-09-16 15:46 1079/* '#ahah' => array( // w ... -
上传出错
2010-09-12 01:07 877more than likely eveyone who is ... -
Drupal系统.htaccess文件的设置 (转)
2010-09-11 21:15 2210对很多站长而言,做301重定向是一个非常麻烦的事,尤其 ... -
taxonomy 模块有个隐藏的路径
2010-09-10 11:17 744taxonomy 模块有个隐藏的路径,“taxonomy/te ... -
使用Flag来标记精华评论(转)
2010-09-09 14:08 2449flag模块是一个灵活的标记模块,使用这个模块可以标记任意的节 ... -
views中为图片或标题加新窗口链接的最好办法
2010-09-08 22:19 908首先在field中加入path,把path调到最前面。选中Ex ... -
i18n Synchronization 及 image_fupload的问题
2010-09-08 22:19 719新建文件时同步不正常,但编辑却正常。 drupal.org上 ... -
列出所有terms的token
2010-09-08 22:17 606装上token_custom插件 定义一个token为 ... -
同一drupal多站点,clean url不工作
2010-09-08 22:16 859把.htaccess里的 RewriteRule ^(.*) ... -
修改drupal的ping模块以便ping中文搜索引擎
2010-09-08 22:14 1462Ping:Ping 是针对 blog内 ... -
drupal中views标题的动态写法
2010-09-08 22:12 1037当views从Arguments中动态提取参数的时候,标题用% ... -
cck pager中的号码从只有下方改成上下都有
2010-09-08 22:11 815cck_pager.module中的 functio ... -
drupal theme:按照内容类型设计页面布局
2010-09-08 22:09 1710由 Evance 于 星期一, 2007-12-24 08:5 ... -
drupal views中page内容和default不同的办法
2010-09-08 22:08 793Fields→按下override→更新。此時針對Fields ... -
drupal在导航菜单中加上|字符
2010-09-08 22:07 1675Copy and paste the theme_links ... -
Zen 初始化主题的安装ZZZ
2010-09-08 22:02 9901.下载最新版的zen( http://drupal.org/ ... -
computed_field的使用
2010-09-08 22:01 801Computed Code: if (is_null($ ...
相关推荐
Damla -Free Premium WordPress Theme Damla -Free Premium WordPress Theme Damla -Free Premium WordPress Theme
hexo-theme-freemind, hexo最强大的Bootstrap 主题 Hexo-Theme-Freemind Freemind旨在充分利用 Bootstrap的优势。演示工具q&服务器标签插件颜色主题中文中文版中文自述文件要求Hexo> = 3.0hexo-tag-
Portfolio-Free-Ghost-Theme, Ghost的简单组合主题 投资组合Ghost 免费主题,由 GavickPro准备。-> 演示 如果你使用了较老版本的主题,则需要设置封面图像。如果你使用的是旧版本的主题,则你必须为所有旧帖子设置...
Android_样式(style)&主题(theme)&显示单位
free theme for wordpress
Adding tag display to your theme 170 General template tags—the least you need to know 173 Conditional tags 179 This material is copyright and is licensed for the sole use by Gay Anschultz on 5th ...
Delphi IDE Theme Editor - You can modify delphi IDE color, font, etc
Win7 64位和更高版本的windows系统需要使用原版的uxtheme.dll、themeservice.dll、themeui.dll三个文件替换 C:\Windows\System32\uxtheme.dll C:\Windows\System32\themeservice.dll C:\Windows\System32\themeui....
Magento Responsive Theme Design
Dreamweaver Dark Code Theme
Eclipse color Theme离线安装(亲测可行) 1:下载更新包,解压后将features和plugins放在eclipse安装目录下的...2:在window--->preference-->appearance-->color theme中选择sublimeText2(有很多,可以自己选择)
Visual Studio Color Theme Editor for Visual Studio 2010 更新日期 2010/8/20 版本 1.3 支持 Visual Studio 2010
Virtual audio cable free download
为了方便有需要的人,打包了UniversalThemePatcher这个工具和 未破解的 themeservice.dll themeui.dll uxtheme.dll 文件,以及这三个文件供UniversalThemePatcher使用的还原文件(就是加了后缀.backup的三个文件),...
Free theme for wordpress web
android中Theme的用法,theme
darkest theme ,离线插件,离线插件,离线插件,离线插件离线插件离线插件离线插件离线插件离线插件离线插件离线插件离线插件
Eclipse color Theme离线安装 评分: 解压缩到eclipse目录下. 在window--->preference-->appearance-->color theme中选择
sourceinsight4.0版本 Monokai_Theme 风格,按照sublime text3 配置。