How to create a single link to a product category based on CategoryID?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Hi All,

How to link a single category of your own choosing based on the Category ID (or anything else)?
Where the category name would be displayed based on the current working language?

Basically the same as how Topics are linked, but with categories
<a href="@Url.RouteUrl("Topic", new { SystemName = "yourTopicSystemName" })">@T("TopicName")</a>

Thank you
9 years ago
Using this:
@Url.RouteUrl("Category", new { SeName = "sename-of-category" })

Provides the URL, but it is not localisation friendly.  As in in multi-store / multi-language settings it only returns whatever SeName you enter, and not the appropriate URL for the language selected.  For example where each English URL differs from the French language URLs for the same category.

Thoughts?

Thank you
9 years ago
Ok solved, just use TopicMenu as template and pass the category ID into the helper to pick and choose where to place individual category links.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.