Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14346

Add title for item as suffix in url, only for one controller

$
0
0
Hi
I've an application in CI 3.x
I have a special controller which I'd like to make more SEF

The actual uri is
http://www.myapp.com/index.php/item/detail/325

and I'd like to make it
http://www.myapp.com/index.php/item/deta...r-whatever

And also I'll remove index.php with .htaccess etc.

The question would be:
Is there any way to override site_url() and add the item's title (stored in db) as url suffix ?

I may create a model's function which can get title and then modify the 19 view files where I call item/detail controller/method but it will be a pain in the a**

Maybe another idea? Thanks

Viewing all articles
Browse latest Browse all 14346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>