@slikts
I understand your concern.
What you ask for is on the roadmap.
If you can provide a good solution sooner, that will not break how things work for now, and contribute it back to the project, i’m sure that the team will gladly welcome your modifications.
@nyl
Put what you want to be file based into actual files and use some code to get it back from there before checking for db entries.
I don’t keep my chunks and snippets in the db in the database for the same reason as you don’t want to.
Example for chunks in Revo:
<?php
/**
* Creates a temporary modChunk object from a tpl file.
*
* @access private
* @param string $name The name of the chunk to load from file.
* @return modChunk The newly created modChunk object.
*/
private function _getDefaultTplChunk($name) {
$chunk = false;
$f = $this->config['chunks_path'].strtolower($name).'.html';
if (file_exists($f)) {
$o = file_get_contents($f);
$chunk = $this->modx->newObject('modChunk');
$chunk->set('name',$name);
$chunk->setContent($o);
}
return $chunk;
}
This code is taken straight from Quip and it was there in early alpha stage.
Maybe you can ask for an official API function from the Team. idk...