Skip to main content

Home/ foograde/ Group items tagged view

Rss Feed Group items tagged

Fernando Vega

Alternativo layout por accion - 0 views

  • Just use $this->setLayout('popup') in your action or use in the view.yml of your module: actionSuccess: layout: popup
  •  
    layout diferentes por accion, util para peticiones de ajax por iframes
Adán Muguiro

The Definitive Guide to symfony | Chapter 7 - Inside The View Layer | symfony | Web PHP... - 0 views

  • <?php   class newsComponents extends sfComponents { public function executeHeadlines() { $c = new Criteria(); $c->addDescendingOrderByColumn(NewsPeer::PUBLISHED_AT); $c->setLimit(5); $this->news = NewsPeer::doSelect($c); } }
  • <div> <h1>Latest news</h1> <ul> <?php foreach($news as $headline): ?> <li> <?php echo $headline->getPublishedAt() ?> <?php echo link_to($headline->getTitle(),'news/show?id='.$headline->getId()) ?> </li> <?php endforeach ?> </ul> </div>
  • // Call to the component <?php include_component('news', 'headlines', array('foo' => 'bar')) ?>   // In the component itself echo $this->foo; => 'bar'   // In the _headlines.php partial echo $foo; => 'bar'
  •  
    Componentes en Symfony
1 - 2 of 2
Showing 20 items per page