1
だからDoctrineモデルへの "taggable"拡張を実装するfzTagプラグインを使用します。 $ blogentry-> getTags()は一つだけタグを返します。symfony:fzTag-Pugin、Doctrine:テンプレート内のタグを取得
<?php foreach ($blogentry->getTags() as $tag): ?>
<a href="<?php echo url_for('blog_tags',$tag) ?>"><?php echo $tag->getName() ?></a>
<?php endforeach; ?>
しかし、テンプレートに:
$this->pager = new sfDoctrinePager('BlogEntry',5);
$this->pager->setQuery(Doctrine::getTable('BlogEntry')->createQuery('a')->leftJoin('a.Tags t')->where('t.id = ?',$this->tag->getId()));
$this->pager->setPage($request->getParameter('page', 1));
$this->pager->init();
と私のテンプレートでは、私が使用:私のアクションで
私は何かのように持っていますか?どのように私はこれを変更できますか?
ありがとうございます! – worenga