I need a variable on the prod page with the cononical url. Is this a reliable way to create it? <mvt:assign name="g.canonical_url" value="'https://www.SITENAME.com/' $ g.category_code $ '/' $ l.settings:product:code $ '.html'" />
Announcement
Collapse
No announcement yet.
canonical url variable
Collapse
X
-
canonical url variable
Larry
Luce Kanun Web Design
www.facebook.com/wajake41
www.plus.google.com/116415026668025242914/posts?hl=en
Tags: None
-
wajake41 Are you using Miva's URI Management feature? If so there are a couple variables you can use without creating your own.
&mvt:product:url;
&mvt:product:link;
If you are not using the URI Management feature (I suggest you migrate to make URI Management easier) the method you have would work. However g.category_code is not always going to be available for every page template. You might be better having a product custom field with the URL slug so that you have access to it on any page with the custom field read function.
Here is more information on how to activate the Token List module so you can see what variables are available on the page: https://docs.miva.com/developer/deve...list/overview/
Nicholas Adkins
Technical Training Specialist / Miva, Inc.
[email protected]
https://www.miva.com/mivalearn
-
Hi Nick: Just doing this on PROD so I think it will work. I am using the PROD template so I see the Tokens. Thanks for the advice.Larry
Luce Kanun Web Design
www.facebook.com/wajake41
www.plus.google.com/116415026668025242914/posts?hl=en
Comment
Comment