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.
私はhtmlコードを持っていて、それにノードタイトルを挿入したい(「ラベル」の場所にちょうど)ので、これは私がやったことです:
<?php $nid = 4; $node = node_load($nid); $title = $node->title; ?> var node = { label : $title };
しかし、それは drupal には表示されません。私は何か間違ったことをした?
ありがとうございました、
ジェイミー
php 変数を HTML に出力しようとしているように見えます。その場合は、変数を php タグで囲み、次のように print 関数を使用する必要があります。
<?php print $title; ?>