Does anyone know how I get all my products to have different <Title> tags? Currently all my categories just have 'Catalog' and all my products just have 'Product'.
My master Umbraco template is using @pageName and this is obviously the problem - how can I get it to say, 'if this page is a catalog or product page, then show the name of the catalog or product'.
So to get started I created the macro below. I added a defintion for titleTag in my products but it isn't working. I'm pretty new to XSLT by the way...! Can you tell me where I am going wrong? Thanks again!
uCommerce uses some urlrewriting to beautify the urls. If you look at that rules you can see that the category or product page has query parameters in the url for catalog, category (and product).
You can use this parameter in your xslt macro to fetch the current watched category/product.
To fetch the product in the macro you have to add it as a parameter. Then where you add your macro you have to insert something like this als the value for the parameter: [@product]. With this the current product will be available in the macro.
<Title> tags for categories and products
Does anyone know how I get all my products to have different <Title> tags? Currently all my categories just have 'Catalog' and all my products just have 'Product'.
My master Umbraco template is using @pageName and this is obviously the problem - how can I get it to say, 'if this page is a catalog or product page, then show the name of the catalog or product'.
Any help really appreciated!
Tim
I have added a SEO macro to the headsection of the umbraco master template.
This macro fecth the relevant information for uCommerce Product/Category/Catalog, and has a fallback with the umbraco pagename etc.
You can limit this to just the title-tag, but i would advice using a full SEO setup (title, description,keywords and NoIndex).
Thanks Nickolaj, appreciated.
So to get started I created the macro below. I added a defintion for titleTag in my products but it isn't working. I'm pretty new to XSLT by the way...! Can you tell me where I am going wrong? Thanks again!
Unfortunately im not a XSLT guy (i do all my macros in Razor), so i can't really help you out
uCommerce uses some urlrewriting to beautify the urls. If you look at that rules you can see that the category or product page has query parameters in the url for catalog, category (and product).
You can use this parameter in your xslt macro to fetch the current watched category/product.
To fetch the product in the macro you have to add it as a parameter. Then where you add your macro you have to insert something like this als the value for the parameter: [@product]. With this the current product will be available in the macro.
Remember that this is just the id of the product. With that you can use the ucommerce xslt libbrary to get the product.
Then you can display your html title tag with the custom protperty you added to the definition.
I'm no xslt ucommerce expert because i also write my stuff in razor. But i think that will guide you in the right direction.
is working on a reply...