Welcome Guest, Not a member yet? Register   Sign In
Creating Dynamic Pages
#1

[eluser]barisv[/eluser]
Hi,

I am dynamically creating links that will refer news are added by admin.

The news are added to the database as id, title and its content. And I am showing the list of news on any view by using related table on db. The news are shown like list of item by their title. For instance;


Code:
<a href="http://localhost/page/news/this-is-a-news/1">this is a news</a>
"news" is my controller and next segment the title of news and the last one is its id.

If I can get id of the news from url, I can dynamically create the page but I couldnt reach it because it says 404 page not found as I expect also. How can I design the system to solve this issue ?

I suppose that it waits for methods after
Code:
http://localhost/page/news/
but its not.

I know that I can reach url segment as below, but I didnt get how to use it for this problem.
Code:
$id = $this->uri->segment(5);


Thanks in advance.


Messages In This Thread
Creating Dynamic Pages - by El Forum - 02-24-2011, 03:14 PM
Creating Dynamic Pages - by El Forum - 02-24-2011, 03:55 PM
Creating Dynamic Pages - by El Forum - 02-24-2011, 04:52 PM
Creating Dynamic Pages - by El Forum - 02-24-2011, 06:25 PM
Creating Dynamic Pages - by El Forum - 02-24-2011, 09:37 PM
Creating Dynamic Pages - by El Forum - 02-25-2011, 03:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB