- Drupal 6 Theming Cookbook
- Karthik Kumar
- 222字
- 2021-04-13 16:56:43
This recipe details the steps involved in toggling block visibility based on which type of user is viewing the page. For example, a block displaying advertisements might only need to be visible for anonymous users and not for authenticated users.
For this recipe, we will be configuring the welcome message block which we created in an earlier recipe in this chapter, to only be visible to authenticated users.
Controlling block visibility is handled from the block administration pages as outlined in the following:
- Navigate to
admin/build/block
(Home | Administer | Site building | Blocks). - Locate the block which needs to be configured—the
Welcome message
block—and click on the Configure link next to it. - On the configure screen, scroll down to Role specific visibility settings.
- Check the box corresponding to the authenticated user role which should have access to the block.
- Click on the Save block button at the bottom of the page to save the changes.
推薦閱讀
- Vulkan學(xué)習(xí)指南
- 自己動(dòng)手寫(xiě)分布式搜索引擎
- UG NX 12.0中文版完全自學(xué)一本通
- 數(shù)字孿生體:第四次工業(yè)革命的通用目的技術(shù)
- AIGC輔助數(shù)據(jù)分析與挖掘:基于ChatGPT的方法與實(shí)踐
- MLOps實(shí)戰(zhàn):機(jī)器學(xué)習(xí)模型的開(kāi)發(fā)、部署與應(yīng)用
- Puppet 2.7 Cookbook
- NHibernate 2 Beginner's Guide
- 專(zhuān)業(yè)級(jí)音樂(lè)制作理論與實(shí)踐Pro Tools:從入門(mén)到應(yīng)用
- 從零開(kāi)始:AutoCAD 2010中文版建筑制圖基礎(chǔ)培訓(xùn)教程(第2版)
- Asterisk 1.4 : The Professional's Guide
- 中文版Photoshop CC基礎(chǔ)培訓(xùn)教程
- Solid Edge 機(jī)械設(shè)計(jì)基礎(chǔ)及應(yīng)用
- Moodle Course Conversion: Beginner's Guide
- CorelDRAW X6平面設(shè)計(jì)與制作案例教程