简体   繁体   English

如何在Drupal中显示文本块?

[英]How to display blocks of text in drupal?

I'm trying to build a module that lets users with a certain role post messages that will be displayed for users with a different role. 我正在尝试构建一个模块,该模块允许具有特定角色的用户发布将为具有不同角色的用户显示的消息。 I'd like this to simply be one module that handles both these things, however, the furthest I've gotten is setting up the form to post messages. 我希望这只是一个处理这两种情况的模块,但是,我所得到的最远的是设置表单以发布消息。

I'd like to show the posted messages on the same page as the input form (and hide the form for the unauthorised users), but I just can't figure out what I have to do to show the messages. 我想在输入表单的同一页上显示已发布的消息(并为未经授权的用户隐藏该表单),但是我只是想不出该怎么做才能显示消息。 How hard can it be to display some simple text? 显示一些简单的文字有多困难?

So far I've added an item to the menu that links to the page with a form on it. 到目前为止,我已经在菜单中添加了一个项目,该项目链接到带有表单的页面。

The Content Access module will let you restrict view permission for a given content type to users having a certain role. 内容访问模块将使您可以将给定内容类型的查看权限限制为具有特定角色的用户。

For setting up the layout, you might want to put the posted messages in a block or use Panels . 要设置布局,您可能需要将发布的消息放在一个块中或使用Panels

You could make use of the boxes module to have online editing of this text that other users will see. 您可以利用boxs模块对其他用户将看到的文本进行在线编辑。 If you're set on Using your custom Form you could put your text in a block. 如果您设置为使用自定义表单,则可以将文本放在一个块中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM