Welcome Guest, Not a member yet? Register   Sign In
Question about best practices for write anchors
#1

[eluser]JulianM[/eluser]
Hi,

I would like to know your opinion about what are the best practices to write anchors in an application that uses custom routes.

Mostly of my applications are multi-language. For example, imagine a simple master/detail application. You need to link from a List to each detail view with id=27.

English: /product/27
Spanish: /producto/27

So, I have a route from /producto (in Spanish) to /product controller in English.

But at the time I write anchors in the master view to link to each detail view, I would like to use the right language.

For example:
<?php echo anchor('product/27') ?> when I am in English language
<?php echo anchor('producto/27') ?> when I am in Spanish language

What do you think is the best approach to specify the anchors?
Should I use a helper that render the right route each time?

Thanks.

Julian


Messages In This Thread
Question about best practices for write anchors - by El Forum - 03-13-2009, 11:47 AM
Question about best practices for write anchors - by El Forum - 03-13-2009, 01:18 PM
Question about best practices for write anchors - by El Forum - 03-13-2009, 01:23 PM
Question about best practices for write anchors - by El Forum - 03-13-2009, 01:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB