Added support for both list and thumbnail views of index page.