ผมใช้เวลานานกว่าจะหาทางทำให้ drupal (4.7.x) แสดง block เฉพาะ user ที่ login แล้วได้

วิธีการง่ายๆ (แต่หา document ยาก) แค่ ใส่คำสั่งต่อไปนี้ในส่วนของ Page specific visibility settings ของ block นั้นๆ (ให้เลือก Show if the following PHP code returns TRUE (PHP-mode, experts only) ก่อนด้วยครับ)

< ?php
global $user;
return (bool) $user->uid;
?>

URL ที่เกี่ยวข้อง:

http://drupal.org/node/60317

http://drupal.org/node/64854

Popularity: 1% [?]

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Set your Twitter account name in your settings to use the TwitterBar Section.