In module development, I'm using a field for menu item (from these docs https://docs.joomla.org/Menuitem_form_field_type). I can work out to to show the menu item in the XML:
<field name="menuitem1" type="menuitem" default="45" label="Select a menu item" description="Select a menu item" />
I can then echo this for the frontend:
<a href="<?php echo $params->get('menuitem1');?>" >
But this only shows the ID of that menu item, how can I set it to be the actual URI for the menu item selected?