Welcome Guest, Not a member yet? Register   Sign In
Is this blog functionality possbile
#1

[eluser]jcjc[/eluser]
During my lunch break yesterday I built a simple blog and have the controllers home and post (post retrieves the single blog post). It did get me thinking of a way to simplify the process and wondered if it were possible to achieve the following.

1. I have a home controller which loops through getting each of the posts that are inside the db.
2. Each title has a link referencing the title like so "/lorem-ipsum".
3. User clicks the link and is taken to the same home view but only the single post is shown.

Could this be achievable?


I initially explored the idea of using $_GET and the segment_array() function, but it didn't work.

Thanks
#2

[eluser]InsiteFX[/eluser]
Look at the News tutorial in the CI Users Guide.




Theme © iAndrew 2016 - Forum software by © MyBB