/assets/images/[[*template]]/
$path = str_replace('{template}', $resource->get('template'), $path);[[migxResourceMediaPath? &pathTpl=`assets/content/{template}/{id}/`]]<?php
$templateName = $modx->db->getValue( $modx->db->select( 'templatename', $modx->getFullTableName('site_templates'), 'id='.$modx->documentObject['template'] ));
?>if ($template = $resource->getOne('Template'){
$path = str_replace('{templatename}', $template->get('templatename'), $path);
} if (strstr($path, '{breadcrumb}')) {
$breadcrumbpath = '';
for ($i = 1; $i <= $breadcrumbdepth; $i++) {
$breadcrumbpath .= $parentids[$i] . '/';
}
$path = str_replace('{breadcrumb}', $breadcrumbpath, $path);
} else {
$path = str_replace('{id}', $docid, $path);
$path = str_replace('{pagetitle}', $resource->get('pagetitle'), $path);
$path = str_replace('{alias}', $resource->get('alias'), $path);
$path = str_replace('{templatename}', $template->get('templatename'), $path);
$path = str_replace('{parent}', $resource->get('parent'), $path);
$path = str_replace('{ultimateparent}', $ultimateParent, $path);
}if ($template = $resource->getOne('Template'){
$path = str_replace('{templatename}', $template->get('templatename'), $path);
} } else {
$path = str_replace('{id}', $docid, $path);
$path = str_replace('{pagetitle}', $resource->get('pagetitle'), $path);
$path = str_replace('{alias}', $resource->get('alias'), $path);
if ($template = $resource->getOne('Template'){
$path = str_replace('{templatename}', $template->get('templatename'), $path);
}
$path = str_replace('{parent}', $resource->get('parent'), $path);
$path = str_replace('{ultimateparent}', $ultimateParent, $path);
}