<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ynsyns</author_name>
  <author_url>https://blog.hatena.ne.jp/ynsyns/</author_url>
  <blog_title>ささいなoutput</blog_title>
  <blog_url>https://ynsyns.hatenadiary.org/</blog_url>
  <categories>
    <anon>Smarty</anon>
  </categories>
  <description>tpl内で配列を作りたいときに、こんな風にphpでできたっぽい。というメモ。 テンプレートにphpを混ぜるな、と怒られそうだけど、同じレイアウトをループさせつつ、要素のidには別の名前を振りたいときには便利だった。 {php} $this-&gt;_tpl_vars['ary'] = array('hoge','fuga'); {/php} {section name=idx loop=$ary} &lt;div id=&quot;{$ary[idx]}&quot; class=&quot;foobar&quot;&gt; &lt;!-- content --&gt; &lt;/div&gt; {/section} 連想配列も {php} $this-&gt;_tpl_vars[…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fynsyns.hatenadiary.org%2Fentry%2F20090318%2F1237381072&quot; title=&quot;Smartyテンプレートで配列を作る - ささいなoutput&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-03-18 21:57:52</published>
  <title>Smartyテンプレートで配列を作る</title>
  <type>rich</type>
  <url>https://ynsyns.hatenadiary.org/entry/20090318/1237381072</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
