Tuesday, July 30, 2013

Wordpress blog archive look like in CakePHP

I'm building and application with cakePHP and I'm trying to achieve something like a Wordpress blog archive.

Let's imagine that i have this table in my database:

  • Posts
    • id
    • title
    • body
    • created
    • modified

and i want the output something like this:

<h1>2013</h1>
     <p>Post Title</p>
     <p>Post Title</p>
     <p>Post Title</p>

<h1>2012</h1>
     <p>Post Title</p>
     <p>Post Title</p>
     <p>Post Title</p>

etc etc     

I have searched and tried by myself but unfortunately with no success.

Thanks in advance.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: