Smartyでオブジェクト変数を埋め込むには。

今まで、こんなこと言ってましたが、マニュアル見たらやり方が普通に書いてありました。

その他の文字、たとえば .(ピリオド)や $object>reference(オブジェクト参照)を含む場合は、 その変数を `バッククォート` で囲む必要があります。

というわけで、“で囲んでしまえばバッチリです。例えばpopupの中にオブジェクトを入れるには、

[smarty]
sticky=true
caption="PHP-SeeD"
text="`$obj->description`”
snapx=10
snapy=10}>PHP-SeeD

[/smarty]

こんな感じですね。

関連する記事:

Powered by

Leave a Comment


NOTE - You can 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> <pre lang="" line="" escaped="" highlight="">