Skip to main content
  • Home
  • Drupal 教學
  • Portfolio
  • inmediahk.net
  • Training
  • About
Home

templates 內的欄位值 field_get_items()

  • View(active tab)
  • Revisions
-
templates
Drupal 7.x
transition-7.x
JOE — Mon, 2012-03-19 22:42

打開 node.tpl.php 的時候你便可以發現,
Drupal 7 的多語言支持轉移到以欄位為基礎
在預設的情況之下欄位值都放在 "und" 之內
代表沒有指定的語言
但如果代碼直接使用 und 的話
之後打開多語言設定便會令 templates 出現錯誤
所以便要使用 field_get_items() 來獲得正確的語言欄位值了

ref:
http://www.davereid.net/content/hlkd7fotw-field-get-items

Related

  • Drupal 教學
  • Drupal Theming, 模版
  • Drupal 開發
  • Drupal, javascript 和jquery
  • 3. Drupal views theming 自定 views 模版教學(一)
Google

Recent Comments

Contributions

  • Moved imagefield cropping info into a ta...
  • Contribute Documentation: migrate module...
  • My two bits on Drupal Migrate user pictu...
  • Taking up imagefield_crop module as main...
  • Trying to help imagefield_crop module 7....
  • My little thoughts on features version u...
  • Feeds importer for formatted_numbers mod...
  • Feeds module 6.x, supports import UTF-8...
  • Updating views fields changes field alia...
  • [Contribution to module] CCK table field
  • [Contribution to Doc] Generate SSH keys...
  • [Contribution to Doc] Webform confirmati...
  • [Contributions to Drupal core] system_ip...

Languages

  • 繁體中文
  • English

導覽

  • Drupal 教學
  • 建站軟件
  • 基礎概念(08年3月更新)
  • cck(08年3月更新)
  • views
  • 改變顯示node 的方法

ABOUT ME

I am Joe, Director of http://www.documentonready.com
An professional consultant focus in
Drupal, develop modules, sites,
projects.
Subscribe

More

Recent content

  • Git push over proxy temperately
  • Bangkok chatuchak lockers
  • Rsync git diff files to external
  • Alter comments query to order by DESC
  • Adding open graph tags to node page
  • Moved imagefield cropping info into a ta...
  • Alter user profile page password fields...
  • Drupal commerce - Add to cart anonymousl...
  • Create Drupal commerce order programatic...
  • Drupal feeds module: FeedsProcessor with...
  • Audi Home of Quattro technical review
  • Hennessy Artistry 2013 technical review
  • Web dev's dilemma: integration reso...
  • Audi A3 Facebook app
  • Git autocomplete on Mac
  •  
  • 1 of 23
  • next ›