vgjunkie
I have a perl script that goes out and fetches some configuration files from my routers/switches, which posts to my SVN repo if the file has changed. I'd like to also start being able to store these configuration files into DW and I stumbled across using dwpage.php to do this.
I've created a new namespace as such:
Configurations:Internal:Switch:SWITCHCONFIG
Configurations:External:Switch:SWITCHCONFIG2
The issue I have is, in order to display things properly in DW, I need to add the <code>...</code> at the beginning and end of the file before committing them using dwpage.php. I'd like to avoid having to edit these raw configuration files to add in the code tag if possible.
Is there a way to have it so that DW can automatically display the files in the Configurations: namespace with the code tags automatically. Or at the very least have dwpage automatically append the tags to the imported files wihthout first creating a temp file of the configuration, doing an on the fly edit and then importing?
Thanks!
Jeff
lupo49
What about copying the dwpage.php to dwpage-code.php and wrap the <code></code>-tags about the given input?
vgjunkie
That's a pretty good idea. This is what I'm thinking:
saveWikiText($WIKI_ID, "<code>\n".file_get_contents($TARGET_FN)."\n</code>", $OPTS->get('m'), $OPTS->has('t'));
Thanks for the brainstorm!