块和区域(Blocks & Regions)
优质
小牛编辑
136浏览
2023-12-01
在本章中,我们将研究Drupal Blocks&Regions。 块是用于组织网站内容的容器对象。 它可以显示在您页面的区域中。
以下是创建Drupal Blocks的简单步骤。
Step 1 - 单击Drupal中的Structure ,如下面的屏幕所示。

Step 2 - 然后,单击“ Blocks 。

Step 3 - 显示Blocks页面。 单击“ Add block 。

Step 4 - 将显示一个阻止页面以创建一个新的自定义块,如下面的屏幕所示。

“阻止”页面上显示以下字段。
阻止设置

Block title - 输入Block title 。
Block description - 输入有关阻止的描述。
Block body - 输入块的内容。
Text format - 选择Text format ,即过滤HTML,完整HTML和纯文本。
区域设置

Bartik (default theme) - 选择要在主题中显示块的区域。
Seven (administration theme) - 在Seven (administration theme)选择要显示块的区域。
可见性设定

Page - 允许在所有或特定页面上显示块。
Content Types - 允许显示特定内容中的块,即文章或基本页面。
Roles - 允许显示特定类型用户的块,即匿名用户,经过身份验证的用户或管理员用户。
Users - 允许每个用户在其设置中自定义块的可见性。
现在,在填写所有字段后单击“ Save block 。
Step 5 - 您可以查看创建的块,如以下屏幕所示。
