just worked it out!! the problem was it should have read: <li tal:repeat="type python:'digital', 'analog', 'organic'"> <a href="dummy" tal:replace="var:type">selection</a> </li>