fix bug 858481 - toc_depth = 0 for templates
Merge pull request #994 from groovecoder/edit-template-858481

fix bug 858481 - toc_depth = 0 for templates