Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の Ubercart node-product.tpl.php ページで、より一般的なものから個々の製品の寸法 (高さ、重量、長さ) を抽出しようとしてprint $node->content['dimensions'] ['#value'];います。
print $node->content['dimensions'] ['#value'];
を使用var_dump(get_defined_vars());すると、寸法が個別に出力されていることがわかりますが、印刷できないようです。ページで。寸法を個別に呼び出す適切な方法は何ですか?
var_dump(get_defined_vars());
$node オブジェクトをダンプできますか? それらはおそらくコンテンツ配列の外側にあります。次に、print $node->product->length、またはプロパティが何であれ実行できます。