however because the product node in content is the same and the cache value of 86400, the product title in the browser window doesn't change when going from one product page to another - the first product title is cached.
I works when disabling the caching when setting the value in Cache to 0, but is there a way to pass a unique value in the CacheParameters besides the pageID, so it's unique for every product and category page?
If it is possible to modify the parameter on the request, you can create a field on product definition and category definition that is a guid, and use that as the cacheparameter? Will that do? You can the just recieve the current product / category from the CatalogLibrary.GetCurrentProduct / GetCurrentCategory
We have a querystring parameter for product and category, where the url actually is rewritten for SEO optimization.
I had first added pageID as the first parameter, but that didn't seem to work well with caching and as in uCommerce the is a Umbraco content node "template" for category and product, with the same id. So when I was browsing to another category or product it kept the old cached value for the previously viewed product/category.
So instead I now have product and category parameters first, so when it isn't a product or category page I guess it will be empty or null and fallback to pageID (for all other pages). It seems to works as we want it.
Product key as macro CacheParameters value
I have a razor script for generating SEO meta data, title, canonical, meta description etc.
I saw this post about how to write SEO friendly titles for product and category pages: http://www.ucommerce.net/en/blog/2014/01/27/i-like-bacon.aspx
Hi,
Not sure how it actually works but:
If it is possible to modify the parameter on the request, you can create a field on product definition and category definition that is a guid, and use that as the cacheparameter? Will that do? You can the just recieve the current product / category from the CatalogLibrary.GetCurrentProduct / GetCurrentCategory
Regards
Morten
We have a querystring parameter for product and category, where the url actually is rewritten for SEO optimization.
I had first added pageID as the first parameter, but that didn't seem to work well with caching and as in uCommerce the is a Umbraco content node "template" for category and product, with the same id. So when I was browsing to another category or product it kept the old cached value for the previously viewed product/category.
So instead I now have product and category parameters first, so when it isn't a product or category page I guess it will be empty or null and fallback to pageID (for all other pages). It seems to works as we want it.
/Bjarne
is working on a reply...