เกี่ยวกับ navigator ของ book

  • warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp owned by uid 0 in /var/www/sites/sugree/codenone.com/subdomains/www/html/includes/file.inc on line 190.
  • warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp owned by uid 0 in /var/www/sites/sugree/codenone.com/subdomains/www/html/includes/file.inc on line 190.

ปกติแล้ว เวลาสร้างเนื้อหาแบบ Book ขึ้นมา Drupal จะสร้าง เมนูให้ด้วยเลย
โดยการนำชื่อ tiltle ของ node นั้นๆ มาใช้ ที่นี้ถ้าชื่อ node tiltle มันยาวจริงๆ แบบตัดไม่ได้
ซึ่งพอมาอยู่บน nav ของ book แล้ว มันยาวจนเกินงาม
ผมจึงคิดว่า เราน่าจะเพิ่ม field ขึ้นมาอีกตัวหนึ่งเป็น short-title สำหรับใช้กับ nav ของ book
แล้วไปแก้ code ของ book ให้ึดึงข้อมูลจาก field ดังกล่าว เพื่อสร้าง Navigator แทน node title
พอจะเป็นไปได้ไหมครับ

sugree's picture

เขียนโมดูลเพิ่มได้ ต้องทำสามจุด

  • hook_form_alter
  • hook_nodeapi
  • hook_block

ย้าย Codenone

ประกาศย้าย Codenone ไปใช้ Forum ของ Blognone แทนครับ ตามไปตั้งกระทู้ต่อได้ที่ Codenone Forum (รายละเอียดอ่านจากกระทู้ ย้าย Codenone ไปรวมกับ Blognone)

กระทู้เก่าๆ จะย้ายตามไปในภายหลัง ตอนนี้ปิดการโพสต์กระทู้ไว้ เหลือไว้เฉพาะอ้างอิงเท่านั้น