Announcement
Collapse
No announcement yet.
Conditional to check for socialImage
Collapse
X
-
Hmmm...don't know if this will make google 'happier', but maybe do an elseif and use say the company logo when a product image is not found.
-
Originally posted by Bruce - PhosphorMedia View Postyes, use
l.settings:imagedata:image
in the mvt:if statement.
g.socialimage will always be true
btw: don't know if i'd rely on g.baseurl all the time. i've seen some sites not have that always available. instead use https://&mvt:domain:name;/mm5/etc
Leave a comment:
-
yes, use
l.settings:imagedata:image
in the mvt:if statement.
g.socialimage will always be true
btw: don't know if i'd rely on g.baseurl all the time. i've seen some sites not have that always available. instead use https://&mvt:domain:name;/mm5/etc
Leave a comment:
-
Originally posted by Scot - ScotsScripts.com View PostWhy not do this:
Code:<mvt:if expr="NOT ISNULL g.socialimage"> <img src="&mvte:global:socialimage;" alt="my awesome product"? </mvt:if>
Code:<mvt:do file="g.Module_Library_DB" name="l.success" value="ImageType_Load_Code('main', l.settings:imagetype)" /> <mvt:do name="l.success" file="g.Module_Library_DB" value="ProductImage_Load_Type(l.settings:product:i d, 1, l.settings:imagetype)" /> <mvt:do name="l.success" file="g.Module_Library_DB" value="Image_Load_ID(l.settings:imagetype:image_id , l.settings:imagedata)" /> <mvt:assign name="g.socialImage" value="g.baseurl $ l.settings:imagedata:image" />
Leave a comment:
-
Why not do this:
Code:<mvt:if expr="NOT ISNULL g.socialimage"> <img src="&mvte:global:socialimage;" alt="my awesome product"? </mvt:if>
Leave a comment:
-
Conditional to check for socialImage
Store has some products that don't have images (yet) so the &mvt:global:socialImage; is producing a link that causes a 404 error https://www.domain.com/mm5/ - is there a way to test/check to see if the image is available?
Tags: None
Leave a comment: