I'm trying to automate the output of SKU's into the page's title for all my product pages for SEO reasons however I'm struggling on how to go about this.
I'm using SEO lite for outputting page titles and tried the following code:
<title>{title} {if store_product_sku}{store_product_sku}{/if} {site_name}</title>
Which doesn't appear to work as I'm assuming I need a channel:entries tag or store:product tag, however having tried various combinations of these none of these work either, would appreciate any ideas, here's the other code I've tried:
<title>{title}{exp:channel:entries}{exp:store:product}{if store_product_sku}{store_product_sku}{/if}{/exp:store:product}{/exp:channel:entries} {site_name}</title>
store_product_sku
to{product_details:store_product_sku}
For the second line if{title}
works then IMO you are already in the exp:channel:entries so you are already duplicated it. Other way it looks fine.