added listeners to the template
index link, some check for optional properties