Template system for WebPages framework