1
그래서 im 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