<?php //print_r($_POST); $chunknames = array($_POST['name']); //print_r($chunknames); $bcc = new blox_Chunk_Collection($chunknames, $this); //$settingslist=array('blox_template','ditto_hiddenfields','xedit_tabs'); $settingFields = explode(',', $this->container['params']['chunk_SettingFields']); //print_r($settingFields); if (count($settingFields) > 0) { foreach ($settingFields as $settingField) { $settingField = explode(':', $settingField); //$bcc->setSetting($_POST['name'],$settingname,$_POST[$settingname]); $bcc->settings[$_POST['name']][$settingField[0]] = $_POST[$settingField[0]]; } //print_r($bcc->settings); $bcc->saveSettings(); } //$modx->db-pinsert();
//only ditto knows the documents to get at this time //use ditto for that in all cases (blox_container and parent_container) too??? $ditto_output = '-'; $blox_Ditto->set('noResults', $ditto_output); $blox_Ditto->set('tpl', '@CODE:[+chunkname+],'); $blox_Ditto->set('display', 'all'); $blox_Ditto->set('showPublishedOnly', $xedit->userPermissions['canseeunpublisheddocs'] == '1' ? '0' : '1'); $ditto_chunknames = $blox_Ditto->run('1'); if ($ditto_chunknames !== '-') { $ditto_chunknames = substr($ditto_chunknames, 0, -1); $chunknames = explode(',', $ditto_chunknames); } } } $block = isset($block) ? $block : ''; $bcc = new blox_Chunk_Collection($chunknames, $xedit); $bcc->setChunkContentsPH($block); $allChunkFieldNames = $bcc->mergeAllFields(); if (isset($orderByField)) { $allChunkFieldNames[] = $orderByField; } $blox_Ditto->set('hiddenFields', implode(',', $allChunkFieldNames)); //parents hat vorrang vor documents, oder?? /* das werk irgendwie anders untersuchen if (isset($documents)){ $blox_Ditto->set('docids', $documents); }else{ $blox_Ditto->set('parents', $childids[$showblock]); } if (isset($parents)){ $blox_Ditto->set('parents', $parents);