Johannes
Johannes

Reputation: 335

how can I get the URL variable in modx gallery

I installed modx gallery and I want to link to the URL I type in when I upload new pictures on the backend. I tried to customize the template but can't find the URL-variable from the upload form:

http://rtfm.modx.com/display/ADDON/Gallery.Gallery.thumbTpl

How would I do this? Thank you.

Upvotes: 0

Views: 1377

Answers (1)

Svetljo
Svetljo

Reputation: 303

The placeholder for the URL is [[+url]]. So, call

[[!Gallery &album=`1` &thumbTpl=`myThumbTplChunk`]]

and create chunk called "myThumbTplChunk" with this code:

<div class="[[+cls]]">
    <a href="[[+url]]">
        <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
    </a>
</div>

Upvotes: 2

Related Questions