Announcement

Collapse
No announcement yet.

Slider Only Functions on SFNT Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Slider Only Functions on SFNT Page

    I have two sliders implemented on my Miva based site, the Hero Slider (from the booc theme) and another one I stitched together from some other code floating about in the wild. Both function as intended on the SFNT page of my site however the exact same code on any other page ignores the slider functionality and just stacks the images as though there were no javascript involved (my end goal here is to use these same sliders on another page).

    For reference, this is the code on my SFNT page:
    <mvt:item name="html_profile" />
    <head>
    <mvt:if expr="NOT ISNULL l.settings:page:title">
    <title>&mvt:page:title;</title>
    <mvt:else>
    <title>&mvt:store:name;</title>
    </mvt:if>
    <mvt:item name="head" param="head_tag" />
    </head>
    <body class="&mvt:global:pageClass;" id="js-&mvte:page:code;">
    <mvt:item name="hdft" param="global_header" />
    <div class="column whole hdft-header">
    <mvt:item name="hdft" param="header" />
    </div>
    <div class="column whole">
    <mvt:item name="readytheme" param="navigationset( 'visual_navigation' )" />
    <mvt:item name="readytheme" param="contentsection( 'hero_image' )" />
    <mvt:item name="readytheme" param="productlisting( 'partner-slider' )" />
    <mvt:item name="readytheme" param="productlisting( 'featured_products' )" />
    </div>
    <div class="column whole hdft-footer">
    <mvt:item name="hdft" param="footer" />
    </div>
    <mvt:item name="hdft" param="global_footer" />
    </body>
    </html>

    That exact code posted into a new page will not have slider functionality. Obviously the problem could be based inside of the javascript itself, the image locations or any number of other things but everything is consistent between the SFNT page and the new page I have created so far as I can tell. All enabled items are identical, same javascript is being called, same css pages used, absolute image locations given, I'm out of ideas. Just wondering if maybe anyone else had run into this before or was maybe just more clever than apparently I am. Any help is appreciated.

    #2
    Many times it's because the javascript is looking for a specific body ID tag to fire. Try changing (hard coding) the body tag to that of the SFNT - js-SFNT - sometimes that's a lot easier than duplicating the jsSFNT: function javascript and changing the jsSFNT to whatever screen you have included the code on.
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    Comment


      #3
      That was my first thought as well but altering my js-XXX tags or any of my id tags for that matter has no visible effect.
      I'm no expert at javascript or HTML in general but I from what I can see in the js tags for the slider effect nothing is being specified in reference to a specific page, none of my &mvte:page:code; references seem to have a differing effect when altered.

      Comment

      Working...
      X