Тикет с кнопками

{var $gallery = $_modx->resource.elements | fromJSON}
{foreach $gallery as $galItem}
<a href="{$galItem.img}" title="{$galItem.title}" class=«fancybox2»
data-fancybox=«gallery-{$_modx->resource.id}» rel=«gallery-{$_modx->resource.id}»>
{$galItem.title}


{/foreach}