wrp 提交于
图片字段最好用field_collection
field collection多一个好处是能对所关联的图片集增加额外的字段
<?php print base_path . path_to_theme();?>/images/...
写到src里
外部加APC缓存加速,css/js压缩,模块精简
当开发完毕后,把不用的模块都卸载了,同时删除目录
注意的一点就是,Drupal特喜欢用return和array
到处是return,遍地都是array
drush dl --drupal-project-rename=d7 & drush si --account-name=admin --account-pass=admin --db-url=mysql://root:root@localhost/d7 -y
Drupal里面的Bootstrap指的是Drupal进程的启动过程
网站都快弄完了,,pathauto出了问题,不能设置了
分享以下,以后大家遇到了,可以朝这方向解决~
我的解决方法是,把模块卸载后,进数据库,修复和优化数据库表,然后重新安装模块,JQ版本换一下,然后清理缓存,,重启apache,刷新,,就出来了。。什么原因我不知道,我就这样弄的~
(恢复了,这样弄了一次,又不行了,,应该还是模块冲突的问题~~~ ,,再一个个的卸载了看看,看到底是哪个。。)
云服务器和vps的区别
一个是单台一个是集群均衡负载
替代模块不知,替代方案是在settings.php里添加一行,$conf['theme_debug'] = TRUE;
然后查看源代码你就了然
hook_theme里面,可以定义每个template的输入项
可以是render element,也可以是variables
variables是可以定义这些变量的名字的,render element复杂些,可以参照刚才我说那个文件的注释看看
Drupal这个模板机制,我理解就是在hook_template里面定义对各个tpl的引用和调用方法
然后在render/theme系列函数里面为这些template提供符合前面要求的参数
tpl文件呢,就是把这些输入内容转换成html输出
Node这种module,会在模块中自带template,声明和实现一些基本内容,然后在主题的theme hook里面覆盖掉,重新输出新的样式
图片地址:
<img src="<?php print base_path() . path_to_theme();?>/images/tel_top.jpg" alt=""> //path_to_theme()函数:返回正在用的theme的路径,大部分用于page.tpl.php中
<img src="<?php print path_to_theme(); ?>/images/tel_top.jpg" alt="">
- 登录以发表评论
部份代码记录
function theme_render_template($template_file, $variables) {
// Extract the variables to a local namespace
extract($variables, EXTR_SKIP);
// Start output buffering
ob_start();
// Include the template file
include DRUPAL_ROOT . '/' . $template_file;
// End buffering and return its contents
return ob_get_clean();
}
定义了一个SKIN
funtion myzen_preprocess_page(&$variables, $hook) {
$variables['skin'] = base_path() . path_to_theme();
}
模版里面接受
/skin/images/logo.gif"/>
- 登录以发表评论
dashan 答复于 永久连接部门内部想搞一个会议室预定系统,用哪个模块较好
- 登录以发表评论
wrp 答复于 永久连接2015-4-14
- 登录以发表评论
dashan 答复于 永久连接