{nws-if trim('associatedPhotoGalleryIndexID') != '0'}
{inlineaction search="SELECT * FROM photoGalleryIndex WHERE photoGalleryIndexID = {associatedPhotoGalleryIndexID}" find}
{ilrecord}
{/ilrecord}
{/inlineaction}
{inlineaction search="SELECT photoURL1 AS photoURL1Internal, photoCaption_es AS photoCaptionInternal FROM photoGalleryContent WHERE designatedGalleryID = {associatedPhotoGalleryIndexID} ORDER BY photoPosition ASC LIMIT 6" find}
{ilrecord}
{/ilrecord}
{/inlineaction}
{inlineaction search="SELECT galleryName_es AS galleryNameInternal, photoGalleryIndexID AS photoGalleryIndexIDInternal FROM photoGalleryIndex WHERE photoGalleryIndexID = {associatedPhotoGalleryIndexID}" find}
{ilrecord}
{/ilrecord}
{/inlineaction}
{/nws-if}
{nws-if trim('associatedPhotoGalleryIndexID2') != ''}
SECOND IMAGE GALLERY
{inlineaction search="SELECT * FROM photoGalleryIndex WHERE photoGalleryIndexID = {associatedPhotoGalleryIndexID2}" find}
{ilrecord}
{/ilrecord}
{/inlineaction}
{inlineaction search="SELECT photoURL1 AS photoURL1Internal, photoCaption_es AS photoCaptionInternal FROM photoGalleryContent WHERE designatedGalleryID = {associatedPhotoGalleryIndexID2} ORDER BY photoPosition ASC LIMIT 6" find}
{ilrecord}
{/ilrecord}
{/inlineaction}
{inlineaction search="SELECT galleryName_es AS galleryNameInternal, photoGalleryIndexID AS photoGalleryIndexIDInternal FROM photoGalleryIndex WHERE photoGalleryIndexID = {associatedPhotoGalleryIndexID2}" find}
{ilrecord}
{/ilrecord}
{/inlineaction}
{/nws-if}
{inlineaction search="SELECT * FROM photoGalleryIndex WHERE photoGalleryIndexID = {associatedPhotoGalleryIndexID}" find}
{ilrecord}
{/ilrecord}
{/inlineaction}