Group foreign relations by property type

Lets say you have only a foreign_relation of type='gigi',show_in_html=False. You will end up with a <div class="dt"> containing gigi, but no relations in it. Please fix.