MODx snippets

MODx - migx field

Tabs:
[
{"caption":"Tab Title", "fields": [
  {"field":"title", "caption":"Name"},
  {"field":"description","caption":"Description", "inputTVtype":"textarea"},
  {"field":"imageTV", "caption":"Photo", "inputTV":"imageTV"}
]}
]

Table:
[
  {"header": "Name", "sortable":"true", "dataIndex":"title"},
  {"header": "Photo", "width":"80", "sortable":"false", "dataIndex":"imageTV", "renderer":"this.rendererImage"}
]

MODx - migx inline include

<nav class="soc">
  <ul>
    [[getImageList?
    &tvname=`soc-icon`
    &tpl=`@CODE:<li><a href="[[+link]]"><i class="[[+fa-icon]]" title="[[+title]]"></i></a></li>`
    &docid=`1`]]
  </ul>
</nav>

MODx - migx chunk include

[[getImageList?
&tvname=`migxSlider`
&tpl=`migxSliderItem`
&docid=`1`]]

MODx - pdoResources include

[[pdoResources?
&parents=`5`
&depth=`0`
&tpl=`serviceItem`
&includeContent=`1`
&sortdir=`asc`
]]

MODx - pdoResources chunk & phpthumbof chunk

<div class="col-12 col-lg-4">
  <a href="[[~[[+id]] ]]" class="service-item grid">
    <span>[[+longtitle]]</span>
  </a>
</div>

<img src="[[!phpthumbof? &input=`[[+galleryImage]]` &options=`&w=640&h=480&zc=1`]]" class="img-responsive" alt="[[+title]]">