We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51405
    • 1 Posts
    I am trying to use jQuery plugin ‘prettyPhoto’ with the ‘Gallery’ package.
    When I add the rel=“prettyPhoto” to the chunk ‘galItemThumb’ it breaks the gallery.
    If I click on a thumbnail it tries to open up the prettyPhoto window but I get the error message “Image cannot be loaded. Make sure the path is correct and image exist.”

    If I replace the MODX code for the link with a direct image link prettyPhoto works.
    Here is my code for the chunk modified with the rel=“prettyPhoto” below.

    <div class="[[+cls]]">
    <a href="[[+linkToImage:if=`[[+linkToImage]]`:is=`1`:then=`[[+image_absolute]]`:else=`[[~[[*id]]?
    &[[+imageGetParam]]=`[[+id]]`
    &[[+albumRequestVar]]=`[[+album]]`
    &[[+tagRequestVar]]=`[[+tag]]` ]]`]]" rel="prettyPhoto" title="[[+name]]" [[+link_attributes]] >

    <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" [[+image_attributes]] />
    </a>
    </div>

    Any help would be greatly appreciated.