Home > php教程 > php手册 > body text

工作中的几个Drupal小问题记录总结

WBOY
Release: 2016-05-26 08:20:44
Original
1367 people have browsed it

以下是最近工作中总结的几个Drupal小问题,Drupal性能模块之简明分析对比,实现view动态输出的步骤方法,为Drupal主题添加主题内自带图片的正确方法。其中第一个是在网上找到的翻译国外内容,这此感谢这些默默翻译的高手。

Drupal性能模块的简明分析对比 

原文:

Varnish

We explored various caching solutions available for Drupal. We shortlisted Varnish, Boost and Authcache modules. We performed a number of tests using these modules. We tested over 1000 pages from different locations. The average page load time without any caching was above 4.0 seconds. The average page load time with Drupal's default caching was 2.5 seconds. The average page load time with the Authcache module was reduced to 1.8 seconds. The average page load time with the Boost module was 1.7 seconds. The average page load time with Varnish module was 1.5 seconds. Therefore we preferred using the Varnish module. These stats are for this site only, the results may vary for other sites.

我简单翻译下:

用1000个不同的页面作的测试,

1.不用任何缓存模块:平均加载时间4秒以上;

2.使用drupal自带缓存:平均加载时间2.5秒;

3.使用Authcache模块,平均加载时间1.8秒;

4.使用Boost模块,平均加载时间1.7秒;

5.使用Varnish模块,平均加载时间1.5秒;

-----------------------------------------------

实现view动态输出的步骤方法

1、在 view 的属性页,选择 header

2、选择 Global: Text area

3、在弹出框里,覆写 输出

4、只有Replacement patterns 显示出来的字段,才能被调用

5、注意勾选 *Use replacement tokens from the first row

-----------------------------------------------

为Drupal主题添加主题内自带图片的正确方法

在为drupal的主题添加主题自带的一些图片的时候,会碰到一些路径问题,使用下面这些方法添加的图片,才能正确显示在页面上:

工作中的几个Drupal小问题记录总结

在php标签里面输出url的时候要使用 $base_path 与 主题路径拼接出来的url 然后再加上主题目录里面的静态图片的路径,才能正确的显示.


文章地址:

转载随意^^请带上本文地址!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template