Skip to content

Instantly share code, notes, and snippets.

View JensWolff's full-sized avatar

Jens Wolff JensWolff

View GitHub Profile
@JensWolff
JensWolff / Get Core-Path | MODX Revolution API.php
Last active October 28, 2023 10:45
Get Core-Path (MODX Revolution API)
<?php
$this->modx->getOption('core_path');
@JensWolff
JensWolff / image.tpl
Last active March 3, 2017 16:28
Quick'n'Dirty MODX 2.3.x image-TV-clearbutton (/manager/templates/default/element/tv/renders/input/image.tpl)
<style>
.clearImageTV + .x-panel.modx-panel.x-panel-noborder{
margin-left: 30px;
margin-top: -34px;
}
</style>
<div id="tvbrowser{$tv->id}"></div>
<div id="tv-image-{$tv->id}"><a class="clearImageTV" href="#" onclick="javascript:Ext.getCmp('tvbrowser{$tv->id}').setValue('');document.getElementById('tv{$tv->id}').value='';document.getElementById('tv-image-preview-{$tv->id}').getElementsByTagName('img')[0].remove();"><i class="icon icon-2x icon-trash-o"></i></i></a></div>