On the menu below I need to change the class on the li from dropdown-submenu to dropdown-item for those entries that don't have children. Any ideas?
Thanks
{% set pages = craft.entries.section('services') %}
{% nav page in pages %}
<li class="dropdown-submenu">
{{ page.getLink() }}
{% ifchildren %}
<ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
{% children %}
</ul>
{% endifchildren %}
</li>
{% endnav %}