Is there any way to get a product-object from the public website Url?
If so, how do you do it?
Litium version: 4.8.2
Is there any way to get a product-object from the public website Url?
If so, how do you do it?
Litium version: 4.8.2
Do you mean an URL like:
https://www.example.com/products/pants/special-pants-1234 ?
You can use the last part – special-pants-1234
– to get the Article.
// Get the article by urlName (last segment of the articles url) and language.
Article article = Article.GetArticle(languageID, urlName, FoundationContext.Token);
Seem to be working fine, thank you!