In Miva 5, I'm trying to creating custom meta description and meta keywords for the PROD page based on data stored in custom fields.
Essentially, for an items, if the Artist (S_ARTIST) = "Unknown", I do not want the Artist Name to be includes in the description or keywords. If the name is anything else (like "Joe Smith"), it should be included in the description and keywords.
Here is my code that doesn't work:
<mvt:if expr="mvt:product:customfield_values:customfields: S_ARTST EQ 'Unknown'">
<meta name="description" content="SCrystal &mvt:product:customfield_values:customfields:S_NAM E; - &mvt:product:customfield_values:customfields:S_NUM ; & more SCrystal crystal figurines at Our Company Site &mvt:product:code;.">
<meta name="keywords" content="SCrystal &mvt:product:customfield_values:customfields:S_NAM E;, SCrystal &mvt:product:customfield_values:customfields:S_NUM ;">
<mvt:else>
<meta name="description" content="SCrystal &mvt:product:customfield_values:customfields:S_NAM E; - &mvt:product:customfield_values:customfields:S_NUM ; by &mvt:product:customfield_values:customfields:S_ART ST; & more SCrystal crystal figurines at Our Company Site &mvt:product:code;.">
<meta name="keywords" content="SCrystal &mvt:product:customfield_values:customfields:S_NAM E;, SCrystal &mvt:product:customfield_values:customfields:S_NUM ;, SCrystal &mvt:product:customfield_values:customfields:S_ART ST;">
</mvt:if>
The IF condition is always failing and it executes the ELSE part of the IF.
(Once this is working, I'd like to change the condition to if Artist = "Unknown" or "Team", don't include it in the description or keywords, but since this code is not working, I'm trying to keep the problem simple.)
Can anyone tell me what's wrong with the condition so that I get the results I want?
Thanks,
AM
Essentially, for an items, if the Artist (S_ARTIST) = "Unknown", I do not want the Artist Name to be includes in the description or keywords. If the name is anything else (like "Joe Smith"), it should be included in the description and keywords.
Here is my code that doesn't work:
<mvt:if expr="mvt:product:customfield_values:customfields: S_ARTST EQ 'Unknown'">
<meta name="description" content="SCrystal &mvt:product:customfield_values:customfields:S_NAM E; - &mvt:product:customfield_values:customfields:S_NUM ; & more SCrystal crystal figurines at Our Company Site &mvt:product:code;.">
<meta name="keywords" content="SCrystal &mvt:product:customfield_values:customfields:S_NAM E;, SCrystal &mvt:product:customfield_values:customfields:S_NUM ;">
<mvt:else>
<meta name="description" content="SCrystal &mvt:product:customfield_values:customfields:S_NAM E; - &mvt:product:customfield_values:customfields:S_NUM ; by &mvt:product:customfield_values:customfields:S_ART ST; & more SCrystal crystal figurines at Our Company Site &mvt:product:code;.">
<meta name="keywords" content="SCrystal &mvt:product:customfield_values:customfields:S_NAM E;, SCrystal &mvt:product:customfield_values:customfields:S_NUM ;, SCrystal &mvt:product:customfield_values:customfields:S_ART ST;">
</mvt:if>
The IF condition is always failing and it executes the ELSE part of the IF.
(Once this is working, I'd like to change the condition to if Artist = "Unknown" or "Team", don't include it in the description or keywords, but since this code is not working, I'm trying to keep the problem simple.)
Can anyone tell me what's wrong with the condition so that I get the results I want?
Thanks,
AM
Comment