Fix undefined $params in frontend templates