Drupal7自定义模块的URL生成
来源:互联网 发布:linux web服务器优化 编辑:程序博客网 时间:2024/05/16 10:38
/**
* Implements hook_taxonomy_term_insert
*/
function example_taxonomy_term_insert($term)
{
example_taxonomy_term_update($term);
}
/**
* Implements hook_taxonomy_term_update
*/
function example_taxonomy_term_update($term)
{
$path = array(
'source' => sprintf('term/%d', $term->tid),
'alias' => sprintf('category/%s',
pathauto_cleanstring($term->name),
)
);
path_save($path);
}
/**
* Implements hook_taxonomy_term_delete
*/
function example_taxonomy_term_delete($term)
{
path_delete(array('source' => sprintf('term/%d', $term->tid)));
}
* Implements hook_taxonomy_term_insert
*/
function example_taxonomy_term_insert($term)
{
example_taxonomy_term_update($term);
}
/**
* Implements hook_taxonomy_term_update
*/
function example_taxonomy_term_update($term)
{
$path = array(
'source' => sprintf('term/%d', $term->tid),
'alias' => sprintf('category/%s',
pathauto_cleanstring($term->name),
)
);
path_save($path);
}
/**
* Implements hook_taxonomy_term_delete
*/
function example_taxonomy_term_delete($term)
{
path_delete(array('source' => sprintf('term/%d', $term->tid)));
}
- Drupal7自定义模块的URL生成
- Drupal7 自定义模块之.info文件
- drupal7开启Clean URL
- Drupal7模块multiselect使用
- 写一个Drupal7有关SEO的小模块
- Drupal7 SEO优化必备的10个模块
- drupal7 自定义网站变量
- 自定义gii生成模块
- drupal7 Enable Clean URL's
- Drupal7 集成 Solr4.4模块
- Drupal7 模块开发 之 定义模块
- Drupal 自定义模块条码生成
- Drupal7安装模块时出现的WARNING: You are not using an encrypted connection错误
- drupal7自定义输出节点内容($content里的每一个字段)
- url模块的基本用法
- yii 2 中生成自定义模块
- Drupal7的一些基本笔记
- drupal7 $user 对象的成分
- Rovio发布新游戏Amazing Alex(视频演示)
- 大学生为何后悔上大学
- PHP 书籍 视频 共享[持续更新]
- amcharts如何去掉左上角广告
- typedef void far *LPVOID
- Drupal7自定义模块的URL生成
- Installshield新版本安装时卸载旧版本的安装
- delphi xe使用unidac中的TUniQuery保存数据报错的解决办法
- Qt之QTextCodec乱谈
- oracle远程连接并导入数据
- SubClassWindow详解
- C#判断文件是否被打开占用
- Android推送通知指南
- 100*100面试题