Is there a way to get more at the core of the ready theme image item? It would be great if I could "print" the alt text, so wherever a ready theme image appears, I can have text just below it, and wrap it all in an anchor tag. I have been able to use jquery to get the alt text to show below the image, but I'd like to use actual text instead. Any ideas?
Announcement
Collapse
No announcement yet.
Ready Theme Image & Alt Text
Collapse
X
-
Ready Theme Image & Alt Text
Ted Hust
AarcMediaGroup.com
Celebrating 13 Years of Outstanding Service & Support
Miva Merchant DesignTags: None
-
Re: Ready Theme Image & Alt Text
See the functions at the bottom of this page:
http://www.miva.com/videos/articles/...-documentation
This will allow you to load all the contents of the image item into variables:
Code:<mvt:item name="readytheme" param="Load_Image('promo_1',g.promo)" /> Sample Output: &mvt:global:promo:active; &mvt:global:promo:code; &mvt:global:promo:css_class; &mvt:global:promo:css_id; &mvt:global:promo:id; &mvt:global:promo:image_alt; &mvt:global:promo:image_hght; &mvt:global:promo:image_id; &mvt:global:promo:image_size; &mvt:global:promo:image_wdth; &mvt:global:promo:link_dest; &mvt:global:promo:link_targ; &mvt:global:promo:link_type; &mvt:global:promo:name;
-
Re: Ready Theme Image & Alt Text
I know this is going to be a dumb question, but what the heck is the image path variable? I've tried &mvt:global:promo_1:image; and a few others. I can get the Name, link target, alt and all that to show just fine. Just can't get the dang image path variable figured out.Ted Hust
AarcMediaGroup.com
Celebrating 13 Years of Outstanding Service & Support
Miva Merchant Design
Comment
-
Re: Ready Theme Image & Alt Text
Here's what I was trying......
Code:<mvt:item name="readytheme" param="Load_Image('promo_1',g.promo_1)" /> <mvt:if expr="g.promo_1 GT 0"> <a href="&mvt:global:promo_1:link_dest;" class="promo-item"> <img src="&mvt:global:promo_1:image;" class="img-responsive" /><br /> &mvt:global:promo_1:image_alt; </a> </mvt:if>
Code:<mvt:item name="readytheme" param="Load_Image('promo_1',g.promo_1)" /> <mvt:if expr="g.promo_1 GT 0"> <a href="&mvt:global:promo_1:link_dest;" class="promo-item"> <img src="&mvt:global:promo_1:image_source;" class="img-responsive" /><br /> &mvt:global:promo_1:image_alt; </a> </mvt:if>
Ted Hust
AarcMediaGroup.com
Celebrating 13 Years of Outstanding Service & Support
Miva Merchant Design
Comment
-
Re: Ready Theme Image & Alt Text
in the Load_Image() function there are two parameters. The first one needs to be the code of the image you are trying to load. It should match the code you have defined for the image in ReadyThemes.
The second parameter is the variable you want to load the data into. It can be anything you want. g.image, g,my_image, g.homepage_image, etc
Depending on the name is how you will reference the data:
If you name it g.homepage_image then the data will be accessed:
g.homepage_image:image_alt; (&mvt:global:homepage_image:image_alt;)
Edit: Re-read your post. I don't think the image path is included in the variables. Looks like it may have been on oversight on our end. I will file a bug on it.Last edited by Brennan; 02-12-15, 09:29 AM.
Comment
-
Re: Ready Theme Image & Alt Text
Yeah, I got all of the others to work. I assumed it would have just ben &mvt:global:promo_1:image; and I tried others as well. Is this something that won't roll out for quite a bit? I'll use the jquery method for displaying the alt tag for now. It will do until this gets fixed up.Ted Hust
AarcMediaGroup.com
Celebrating 13 Years of Outstanding Service & Support
Miva Merchant Design
Comment
-
Re: Ready Theme Image & Alt Text
Originally posted by aarcmedia View PostYeah, I got all of the others to work. I assumed it would have just ben &mvt:global:promo_1:image; and I tried others as well. Is this something that won't roll out for quite a bit? I'll use the jquery method for displaying the alt tag for now. It will do until this gets fixed up.
Code:<mvt:item name="readytheme" param="Load_Image( 'code', g.RT_Image )" /> <mvt:do name="l.null" file="g.Module_Library_DB" value="Image_Load_ID( g.RT_Image:image_id, g.MM_Image )" /> <mvt:if expr="NOT ISNULL g.MM_Image"> <img src="&mvt:global:MM_Image:image;" /> </mvt:if>
Last edited by dcarver; 02-12-15, 10:42 AM.David Carver
Miva, Inc. | Software Developer
Comment
Comment