Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 24 lines (19 sloc) 0.46 kb
f0ff3d9 @mariuz added the view http://book.cakephp.org/view/336/creating-post-views
authored
1 <h1>Blog posts</h1>
2 <table>
3 <tr>
4 <th>Id</th>
5 <th>Title</th>
6 <th>Created</th>
7 </tr>
f398d05 @mariuz simplest view print_r($posts)
authored
8
f0ff3d9 @mariuz added the view http://book.cakephp.org/view/336/creating-post-views
authored
9 <!-- Here is where we loop through our $posts array, printing out post info -->
10
11 <?php foreach ($posts as $post): ?>
12 <tr>
13 <td><?php echo $post['Post']['id']; ?></td>
14 <td>
15 <?php echo $html->link($post['Post']['title'],
16 "/posts/view/".$post['Post']['id']); ?>
17 </td>
18 <td><?php echo $post['Post']['created']; ?></td>
19 </tr>
20 <?php endforeach; ?>
21
22 </table>
f398d05 @mariuz simplest view print_r($posts)
authored
23
Something went wrong with that request. Please try again.