nodes are the pages nodes. I'll leave the variable named 'nodes' as is since django-cms is always referring to the menu nodes as 'nodes'. The index error is thrown when there is a site with no root pages visible in the menu(for example an empty site).