Hello. The code below is in my index View. I use it to place into a
table all the articles (from all sections) of my database. How can i
alter it to show only articles from a specific section (e.g.
section_id=1)?



$i = 0;
foreach ($articles as $article):
   $class = null;
   if ($i++ % 2 == 0) {
       $class = ' class="altrow"';
   }

echo $html->link($article['Article']['title'], array('controller'=>
'articles', 'action'=>'view', $article['Article']['id']));

endforeach;



Thanks in advance!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to