Navigation with protocols
I was wondering if it's possible to use the navigation / menu class configuration array to include protocols, not just paths?
For example have mailto: or tel: protocols as the key, such that fuel_nav() could render these and not just urls?
I would like to append a protocol type link to a regular navigation array, but this doesn't work currently.
Comments
https://github.com/daylightstudio/FUEL-CMS/commit/316564eb390145512955200eb1df95940c0fea41
// in _variables/global.php $vars['clever_appends'] = array( 'tel:' => '0123 4567890' ); // in the menu echo fuel_nav( array( 'group_id' => 'some_id', 'container_tag_class' => 'nav navbar-nav', 'container_tag_id' => 'some-nav', 'append' => $clever_appends ) );
and the menu link would be
<a href="tel:0123 4567890">0123 4567890</a>
Doing the above with fuel_nav() doesn't really work, as the location (the tel:) is prepended with the base url. If a protocol were detected, that could be dispensed with?
Admittedly non-http protocols might be considered somewhat academic for menu links, but some other common ones are:
mailto:
ftp:
file:
In fact there are dozens more recognised by the IANA, however many wouldn't even be actionable by browsers:
https://en.wikipedia.org/wiki/URI_scheme