Зря мы гнали на фабрику. Там, судя по всему, очень трудолюбивые программисты работают, не ленятся вот такие галереи "программировать"))))
<div class="goods-photo"> [[*image:is=`userfiles/images/no-photo.png`:or:is=``:then=` <img src="[[phpthumbof? &input=`userfiles/images/no-photo.png` &options=`w=250&h=250&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"> `:else=` <a href="[[phpthumbof? &input=`[[*image]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"> <img src="[[phpthumbof? &input=`[[*image]]` &options=`w=250&h=250&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"> </a> `]] [[*image2:notempty=`<a href="[[phpthumbof? &input=`[[*image2]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image2]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image3:notempty=`<a href="[[phpthumbof? &input=`[[*image3]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image3]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image4:notempty=`<a href="[[phpthumbof? &input=`[[*image4]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image4]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image5:notempty=`<a href="[[phpthumbof? &input=`[[*image5]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image5]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image6:notempty=`<a href="[[phpthumbof? &input=`[[*image6]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image6]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image7:notempty=`<a href="[[phpthumbof? &input=`[[*image7]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image7]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image8:notempty=`<a href="[[phpthumbof? &input=`[[*image8]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image8]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image9:notempty=`<a href="[[phpthumbof? &input=`[[*image9]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image9]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image10]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image10]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image11]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image11]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image12]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image12]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image13]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image13]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image14]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image14]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image15]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image15]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image16]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image16]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image17]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image17]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image18]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image18]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image19]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image19]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] [[*image10:notempty=`<a href="[[phpthumbof? &input=`[[*image20]]` &options=`&fltr=wmi|/assets/templates/default/images/water-big2.png|C|40|||`]]" class="zoom-gal" title="[[*pagetitle]]"><img src="[[phpthumbof? &input=`[[*image20]]` &options=`w=95&h=95&fltr[]=size`]]" alt="[[*pagetitle]]" title="[[*pagetitle]]"></a>`]] </div>