Is there anyway to permanently alter a chunk?
Like grab the data using:
$data = $modx->getChunk(’chunk’);
Then do some stuff to $data, then place $data back in as the data of the chunk from the getChunk call.
Jesse R.
Consider trying something new and extraordinary.
Illinois Wine
Have you considered donating to MODx lately?
Donate now. Every contribution helps.
Well, since you are pulling data from the database, you would need to INSERT INTO or UPDATE the database table fields in order to permanently update the chunk.
$modx->db->query("UPDATE {PREFIX}.site_htmlsnippets SET snippet=’$data’ WHERE name=’chunkName’");
-sD-