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/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Is that possible to generate URL from routing rule? (/thread-37302.html)



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');