Database driven anchor method in CodeIgniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Database driven anchor method in CodeIgniter (/showthread.php?tid=25919) |
Database driven anchor method in CodeIgniter - El Forum - 12-30-2009 [eluser]neillyons.co[/eluser] Using the uri parameter search the routes table for a uri alias. The database schema Code: id, route, controller, weight, created, updated Place the following code in a new file called MY_url_helper.php ( ..system/application/helpers/MY_url_helper.php ). Code: function anchor($uri = '', $title = '', $attributes = '') Let me know what you think of this feature in the comments. |