Hi,
Me and my work colleagues were wondering if it's possible to have a server-side chunk? Hopefully this example will help explain what I'm envisioning:
On all of our snippets, we use
#Error Reporting
ini_set("display_errors", 1);
error_reporting(E_ALL);
And when we go live with a project, we have to manually go through each snippet and remove/comment out those lines.
What we were thinking about is what if we had a chunk called 'error-reporting'
this chunk would contain the error reporting code above, but wouldn't be outputted to the screen, it's only purpose would be to be called in a snippet.
So our snippet calls would be
<?php
echo modx->readChunk('error-reporting');
?>
This wouldn't process the chunk, it would only retrieve whatever was in the chunk and use it in the snippet.
what are your thoughts?