Drupal必备建站模块Contex介绍

无论是模版设计或者区块重复调用,Context都是很好的选择,建议大家好好研究,这应该是必备的模块

Context,配合boxes
Context,可以让区块复用
context,很强大,使网站真正动态,用户体验不同了
context,还可以做面包屑。
context,可以复制做多个
context,可以任意做不同类型的页面
context的作用:什么页显示什么、什么情况下显示什么。

Boxes是可以用features导出的
Drupal下,内容先出,再加CSS,根据需要稍微加一些Class就OK,对HTML结构的沟通可以少很多

context区块建立

1、导航:Structure > Context 点击添加
2、设定以下选项:

Name 名字: 创建后不能修改。
tag : 对创建的context分组.
Description 描述:简单的描述
Require all Conditions:是否需要满足所有的条件。
Conditions : 设定要显示的内容
Reactions : 设定要显示的布局

Name: The name of your context. This is the main identifier for your context and cannot be changed after you've created it.
Tag: A category for organizing contexts in the administrative context listing. Optional. Examples of organizational tags would be block or theme.
Description: A description or human-readable name for your context. This is displayed in the inline editor if available instead of the name.
Require all Conditions: If checked, all conditions must be met for this context to be active. Otherwise, the first condition that is met will activate this context.
Conditions: Trigger the activation of this context.
Reactions: The action to take when the conditions are met.

3、设定显示的内容,选择node type类型。

4、设定显示的布局为区块,选择想要显示的区块和显示的位置。

5、保存后,我们可以在首页看到刚刚选定的区块了。

panels是区块布局,context是区块显示管理