November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
No, I don't think that's possible without custom routing. You at least have to inherit from HierarchicalCatalogPartialRouter and do some magic there.
/Q
Hi Quan,
thanks for your reply.
Do you perhaps know the most efficient way of getting an entry using the seo url? There is GetCatalogEntryByUriDto but from another post that I've read it shouldn't be used when performance is a concern.
How does Commerce resolve the seo url's?
Thanks
Hi,
The Dto is cached so it's not that bad, I haven't measured it but I think it is not worse than loading content, at least not much. I think you can try it to see how it perform s in your site. You can always use your custom stored procedures and cache to improve performance.
We don't provide any equivalent feature in the new content API:s as they work with routesegment instead.
Regards,
/Q
Hi Quan,
I was wonder if it would be possible to register a new mvc route e.g. /games/{seo uri} (where seo uri is the route segment) instead of overriding RoutePartial?
Thanks
Hi,
Theoretically, it should be possible. But you'll have two problems to solve:
- How to make sure your routing will catch the url before some other routers do that.
- How will you get the content from the RouteSegment. the RouteSegment is supposed to be unique within siblings. So it's possible to have both games/rpg/super-cool and games/action/super-cool.
Regards,
/Q
Hi,
We have a catalog "games" with a hierarchy of nodes and then the products/variants.
Is it possible to change the urls to e.g /{catalog name}/{seo url} without writing a custom router?
I was hopeing to do something like this:
var hierarchicalCatalogPartialRouter =
new HierarchicalCatalogPartialRouter(() => gamesCatalog.ContentLink, commerceRootContent, true);
var partialRouteHandler = context.Locate.Advanced.GetInstance();
partialRouteHandler.RegisterPartialRouter((hierarchicalCatalogPartialRouter));
new PartialRouter
RouteTable.Routes.RegisterPartialRouter(hierarchicalCatalogPartialRouter);
Thanks