What do you mean on the frontend.
Are you using it with QuickManager?
5[]
Fatal error: Call to undefined function TR_getTvValueAndLevel() in ..\manager\includes\document.parser.class.inc.php(746) : eval()'d code on line 53
eval ($pluginCode);
Fatal error: Call to undefined function TR_getTvValueAndLevel() in ..\manager\includes\document.parser.class.inc.php(746) : eval()'d code on line 53
\nDTJS;\n\n }else{ \n //NTD - no allowed templates functionality\n }\n \n \n }else{\n //NTD\n }\n \n return $jsOutput;\n\n}\n\n\n\n?>\n
'; var boxHtml = new MooPrompt('System Alert', sysAlert, { buttons: 1, button1: 'Ok', width: 500 }); }); // ]]> Template Rules - Plugin - System Events
Error
Undefined index: pid
db->config['table_prefix']."site_tmplvar_contentvalues WHERE tmplvarid = " . $templateRulesTvID . " AND contentid = " . $startId; $rs= $modx->dbQuery($sql); $row = $modx->fetchRow($rs); if($row && $row['value'] != ''){ //stop while loop $startId = 0; //save TV value $tplVal = $row['value']; }else{ //get next parent $sql = "SELECT parent FROM ".$modx->db->config['table_prefix']."site_content WHERE id = " . $startId; $rs= $modx->dbQuery($sql); $row = $modx->fetchRow($rs); $startId = $row['parent']; } } $retval = array("value"=>$tplVal, "level"=>$level); return $retval; } // gets the value of the default teplate. Used when a new document/resource is created function TR_getDefaultTemplate($tvValueAndLevel){ $tvValue = $tvValueAndLevel['value']; $level = $tvValueAndLevel['level']; $template = 'x'; //set template to the defaultTemplate value $aTplVals = explode(",",$tvValue); if(isset($aTplVals[$level-1])){ $defaultTemplateInfo = $aTplVals[$level-1]; $hasAllowed = strpos($defaultTemplateInfo, '['); if($hasAllowed){//parse allowed templates $aAllowedTemplatesTemp = explode("[",$defaultTemplateInfo); $template = intval($aAllowedTemplatesTemp[0]); }else{ //no allowed templates functionality $template = intval($defaultTemplateInfo); } }else{ //NTD } return $template; } //gets the js code for showing only configured templates function TR_getJsCode($tvValueAndLevel, $documentTemplateId = ''){ $tvValue = $tvValueAndLevel['value']; $level = $tvValueAndLevel['level']; $jsOutput = ''; $aTplVals = explode(",",$tvValue); if(isset($aTplVals[$level-1])){ $defaultTemplateInfo = $aTplVals[$level-1]; $hasAllowed = strpos($defaultTemplateInfo, '['); if($hasAllowed){//parse allowed templates $aAllowedTemplatesTemp = explode("[",$defaultTemplateInfo); //prepare list for javascript, add default id and switch | to , for javascript array compatibility if($documentTemplateId){ $allowedTemplatesList = '[' . $documentTemplateId . ',' . $aAllowedTemplatesTemp[0] . ',' . str_replace("|", ",", $aAllowedTemplatesTemp[1]); }else{ $allowedTemplatesList = '[' . $aAllowedTemplatesTemp[0] . ',' . str_replace("|", ",", $aAllowedTemplatesTemp[1]); } //javascript for hiding unwanted templates in drop down $jsOutput = << DTJS; }else{ //NTD - no allowed templates functionality } }else{ //NTD } return $jsOutput; } ?>