CodeIgniter Forums
Is that possible to generate URL from routing rule? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Is that possible to generate URL from routing rule? (/showthread.php?tid=37302)



Is that possible to generate URL from routing rule? - El Forum - 01-05-2011

[eluser]Unknown[/eluser]
Let's assume I have the following rule:
Code:
$route['product/:any'] = "catalog/product_lookup";

And I want to create a link that passes the rule.
Something like this:
Code:
echo generateRoutingURL( 'catalog/product_lookup', array( 'some_product' ) );
// Output: product/some_product

Is it possible in any versions of CI?


Is that possible to generate URL from routing rule? - El Forum - 01-05-2011

[eluser]Cristian Gilè[/eluser]
Code:
echo anchor($this->uri->ruri_string(),'link name');