If you’re like me and you work in a lot of legacy Tridion implementations then there’s a good chance you spend time each week hunting for that 1 line of code to update, burried somewhere in the thousands of lines of VBScript templates. Oh, you don’t have this problem, lucky you! 🙂
Show Template Source Custom Page
I created a very small custom page that loops through 1 folder and displays all the template code to the screen. My folder structure specifies 1 template type per folder and the custom page is setup that way, and it loops through child folders too. Â Also – you can pass in any URI of a folder and get back the source. You need to use ‘View Source’ in your browser and then copy the source to your favorite text editor. One tip – wait until the whole page finishes loading – otherwise you’ll not see all the templates.
*Update:Â Pages also supported – thanks to Mihai’s suggestion in the comments.
Code highlights
' Show Template Response.Write template.Content
The Code is hosted on GitHub as a Gist, https://gist.github.com/2044332 and also embedded here:
Enjoy!
I would also find it interesting if I. Oils see all the templates code used on by a Page.
So the input to your tool to be a Page instead of a Folder.
Thanks for the suggestion Mihai. I updated the code on GitHub and now also supports pages. Just pass in your PageUri to the page parameter. 🙂