We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36426
    • 197 Posts
    Hi my website is here: http://www.yorkportraitstudio.co.uk/ and I’ve got a few issues with it I was hoping people may help me with.

    1. I’m not sure why but my news/offers aren’t displaying with this call from my template:
    [[!getResources? &parents=`6` &includeContent=`1` &tpl=`myRowTpl`]]

    2. and also I’ve got a problem with my gallery lower down on the page, when you click a photo it moves you back to the top of the page and you have to scroll down again to see the larger pic, is there a way to stay where you are so you can see what appears? I’m using the gallery addon from package manager for this.

    Thank you for any help. smiley
      Yorkshire UK based hosting provider: https://www.simulant.uk
      • 33337
      • 3,975 Posts
      1: Whats in your tpl?

      2: I think you need to use Gallerific or any other lightbox script. http://rtfm.modx.com/display/ADDON/Gallery.Plugins.Galleriffic
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 36426
        • 197 Posts
        thanks for the reply.

        1. My template is:
        <div class="myRowTpl">
        [[+publishedon:strtotime:date=`%b %d %Y`]]<a href="[[~[[+id]]]]">
        <h3>[[+pagetitle]]</h3>
        <p>&nbsp;</p>[[+introtext]]
        <p>&nbsp;</p><h4>Read more...</h4><p>&nbsp;
        </a>
        </div>
        2. Is there no way to make this work with gallery, such as putting a placeholder link on the page so it jumps back down to the image? I’m just not sure how to put this into the page and implement it best...
          Yorkshire UK based hosting provider: https://www.simulant.uk
          • 2740
          • 95 Posts
          Just tested your tpl and it works ok even with the open <p>.

          Are the resources in your 6 folder hidden from the menu? If so add &showHidden=`1` to your getResources call.
            • 33337
            • 3,975 Posts
            For #2, i see what you are talking about. To do that, you will have to change the tpl code, I havent used Gallery yet, but this should help you:

            http://rtfm.modx.com/display/ADDON/Gallery.GalleryItem.tpl

            Append this #nameSomeIdHere to the a href tag: <a href="[[+image]]#nameSomeIdHere">

            You can just put an anchor tag just before your Gallery call to make it work.
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 36426
              • 197 Posts
              Quote from: zi at Feb 05, 2011, 05:49 PM

              For #2, i see what you are talking about. To do that, you will have to change the tpl code, I havent used Gallery yet, but this should help you:

              http://rtfm.modx.com/display/ADDON/Gallery.GalleryItem.tpl

              Append this #nameSomeIdHere to the a href tag: <a href="[[+image]]#nameSomeIdHere">

              You can just put an anchor tag just before your Gallery call to make it work.

              Hi thanks again. Below is the code I’ve mashed together, doesn’t seem to work with the added anchor in there...
              <a name="GalleryAnchor" id="GalleryAnchor"></a>
              [[!GalleryItem]] [[!+galitem.image:notempty=`
              <div class="image"><a href="[[+galitem.image]]"><img class="[[+galitem.imgCls]]" src="[[+galitem.image]]" alt="[[+galitem.name]]" /></a>

              [[+galitem.name]] </div>

              `]] [[!Gallery? &amp;album=`1` &toPlaceholder=`gallery`]]
              <h3><a href="[[~[[*id]] &amp;galAlbum=`[[+gallery.id]]`]]#GalleryAnchor">[[+gallery.name]]</a></h3>
              [[+gallery]]


              <p>&nbsp;</p>
              <p>&nbsp;</p>
              <div class="details">
              <p>Click on a thumbnail above to enlarge.</p>
              </div>
                Yorkshire UK based hosting provider: https://www.simulant.uk