backport from trunk (rev #9722):
- templates updated with named flags and routes