Listing Products

NamePrice Actions
Apple
-6720000000007.56
Orange
1.68
Banana
6.72
Label Value
Locale: en_150
Language: en
Audience: Europe
Contact: europe@example.com
 

Alternatives

The extension AlternativeGetters makes it easy to link to alternative pages.


Verified Routes

Routex is fully compatible with Verified Routes

Type Code Converted to
Auto redirect(socket, url(~p"/"))
Auto redirect(socket, url(~p"/products"))
Auto ~p"/products/1
Fixed ~p"/europe/products/1

Automated Helpers

As alternative routes are generated, the default Phoenix Route Helpers now return values depending on the current 'branch'.

Code Result
Routes.product_show_path(@socket, :show, 2) /europe/products/2
Routes.product_show_url(@socket, :show, 3) https://routex.fly.dev/europe/products/3

Static Helpers

The helpers generated alternative routes always return a route in the associated branch. Below are the helpers to link to a page in branch Europe/Netherlands.

Code Result
Routes.product_show_europe_nl_path(@socket, :show, 2) /europe/nl/producten/2
Routes.product_show_europe_nl_url(@socket, :show, 3) https://routex.fly.dev/europe/nl/producten/3