Is there a built-in way to add Next/Previous buttons to the Product Pages in the Levels Theme?
Announcement
Collapse
No announcement yet.
Next Previous
Collapse
X
-
Next Previous
Keith Oratz
PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
www.preparesmart.comTags: None
-
Unfortunately, there is nothing built into the ReadyThemes to provide this functionality. The easiest approach would be to use the Tool Kit module.Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
Ok, thanks.
Keith Oratz
PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
www.preparesmart.com
Comment
-
I have this but is there a way to include the next previous product main image?
<mvt:item name="toolkit" param="nextprevious|l.all_settings:product:code" />
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="50%"><mvt:if expr="l.settings:tkskip:previous">
<input type="button" rel="nofollow" value="PREVIOUS" class="button button-block uppercase bg-gray white bold" onclick="window.location='&mvte:global:sessionurl; Screen=PROD&Product_Code=&mvte:tkskip:previous;&Ca tegory_Code=&mvte:global:Category_Code;';" />
</mvt:if>
</td>
<td width="50%"><mvt:if expr="l.settings:tkskip:next">
<input type="button" rel="nofollow" value="NEXT" class="button button-block uppercase bg-gray white bold" onclick="window.location ='&mvte:global:sessionurl;Screen=PROD&Product_Code =&mvte:tkskip:next;&Category_Code=&mvte:global:Cat egory_Code;';" />
</mvt:if>
</td>
</tr>
</table>
Comment
-
Something like this might do the trick:
Code:<mvt:item name="toolkit" param="nextprevious|l.all_settings:product:code"/> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="50%"> <mvt:if expr="l.settings:tkskip:previous"> <mvt:do name="l.return" file="g.Module_Library_DB" value="Runtime_Product_Load_Code(l.settings:tkskip:previous, l.previous_product)" /> <mvt:comment> Load Single Image From ImageType - (here the second parameter is hard coded to 1. This will return the image type with an id of 1, which typically should be main) </mvt:comment> <mvt:do name="l.success" file="g.Module_Library_DB" value="ProductImage_Load_Type(l.settings:previous_product:id, 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:previous_imagedata)" /> <mvt:assign name="g.previous_product_image" value="g.baseurl $ l.settings:previous_imagedata:image" /> <!-- &mvt:global:previous_product_image; --> <input type="button" rel="nofollow" value="PREVIOUS" class="button button-block uppercase bg-gray white bold" onclick="window.location='&mvte:global:sessionurl; Screen=PROD&Product_Code=&mvte:tkskip:previous;&Category_Code=&mvte:global:Category_Code;';"/> </mvt:if> </td> <td width="50%"> <mvt:if expr="l.settings:tkskip:next"> <mvt:do name="l.return" file="g.Module_Library_DB" value="Runtime_Product_Load_Code(l.settings:tkskip:next, l.next_product)" /> <mvt:comment> Load Single Image From ImageType - (here the second parameter is hard coded to 1. This will return the image type with an id of 1, which typically should be main) </mvt:comment> <mvt:do name="l.success" file="g.Module_Library_DB" value="ProductImage_Load_Type(l.settings:next_product:id, 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:next_imagedata)" /> <mvt:assign name="g.next_product_image" value="g.baseurl $ l.settings:next_imagedata:image" /> <!-- &mvt:global:next_product_image; --> <input type="button" rel="nofollow" value="NEXT" class="button button-block uppercase bg-gray white bold" onclick="window.location ='&mvte:global:sessionurl;Screen=PROD&Product_Code=&mvte:tkskip:next;&Category_Code=&mvte:global:Category_Code;';"/> </mvt:if> </td> </tr> </table>
Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
-
Matt, where would the next/previous images display?Keith Oratz
PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
www.preparesmart.com
Comment
-
Hi Keith,
That would be up to you to decide where you wanted the image code to be used. The INPUT elements could be changed into IMG elements and retain the 'onclick' function.Matt Zimmermann
Miva Web Developer
Alchemy Web Development
https://www.alchemywebdev.com
Site Development - Maintenance - Consultation
Miva Certified Developer
Miva Professional Developer
https://www.dev4web.net | Twitter
Comment
Comment