CodeIgniter Forums
Pagination and index template conflict - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Pagination and index template conflict (/showthread.php?tid=58144)



Pagination and index template conflict - El Forum - 05-20-2013

[eluser]Unknown[/eluser]
I currently have a news section with lots of stories and summaries. I'm using pagination at the the bottom. All is working but I need some advice on structuring the details page url

eg:

http://mysite.com/news

Title
Summary
read more >

Title two
Summary two
read more >

page 1 of 5

I want the "read more" url to look like this: http://mysite.com/news/title-two

However I'm running into conflicts because of pagination. Basically segment_2 is being used by pagination. eg http://mysite.com/P2

The work around I have is to create a landing template like so: news.group/news-story.html

then link my entry link this: <a href="{url_title_path='news/news-story'}">Read More ></a>

but that adds the unwanted "news-story" to the url

can I do all of this in my news/index.html template?