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.
thanks for the reply.
1. My template is:
<div class="myRowTpl">
[[+publishedon:strtotime:date=`%b %d %Y`]]<a href="[[~[[+id]]]]">
<h3>[[+pagetitle]]</h3>
<p> </p>[[+introtext]]
<p> </p><h4>Read more...</h4><p>
</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...
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.
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? &album=`1` &toPlaceholder=`gallery`]]
<h3><a href="[[~[[*id]] &galAlbum=`[[+gallery.id]]`]]#GalleryAnchor">[[+gallery.name]]</a></h3>
[[+gallery]]
<p> </p>
<p> </p>
<div class="details">
<p>Click on a thumbnail above to enlarge.</p>
</div>