Viewing Add Hyperlinking in to the Nav Menu Widget

Add Hyperlinking in to the Nav Menu Widget



User: wellnl 11 years ago
It would be nice to be able to have hyperlinking built in to the Nav Menu widget e.g. when you have a visitor who wants to contact you, you may have a contact option on your Nav Menu. You have to make a 'Contact' page for this. It would be nice if you could have the menu option where it hyperlinks to your visitors email program instead. The same kind of thing also applies to external sites or file, you can't have this on as a Nav Menu option and have to work around it.

Appreciate that the structure of the Nav Menu widget may make this difficult to achieve...
User: Roddy 11 years ago
An email link is quite easy to create and you can see how on this page...

http://everwebcodebox.com/responsive-template/contact.html

The problem with this type of link is that it won't open all email clients - particularly on PCs running Windows. Even if you do provide this type of link, you should definitely include the email address in plain text if you don't have an actual contact form. Any business website should make it as easy as possible to allow visitors to make contact. A dedicated contact page with as much info as possible is the best way to go.

Providing a location map can be a good move - even for online businesses - as described on this page...

http://everwebcodebox.com/responsive-template/map.html

As far as links to external sites are concerned, these would normally go in a sub menu in an HTML5 aside element so that the SEO spiders know what they are and how to index them. The exception to this would be a blog which is a child element of the site.

-------------------------------
Roddy

Website: http://everwebwidgets.com
Contact: http://everwebwidgets.com/ewWidgets-home/contact.html
NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own.
User: wellnl 11 years ago
Thanks Roddy. Great information as always. My 'request', though, was to have hyperlinking ability as part of the Nav Menu widget functionality itself. So if I want to have a hyperlink to my client's email I can do this in the widget without having to use alternative methods. Thanks!
User: wellnl 11 years ago
duplicate post... deleted

Last edit 11 years ago
User: Roddy 11 years ago
But what I was saying is that this type of link doesn't always work. It depends on the email client (software) that the visitor is using.

-------------------------------
Roddy

Website: http://everwebwidgets.com
Contact: http://everwebwidgets.com/ewWidgets-home/contact.html
NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own.
User: Jumbo T. 11 years ago
Here's a solution.

Create a blank, empty page.

Call it contact.html.

Display it in the menu.

Paste this code in the Footer Code Box of each page.

<script>
$target = "contact.html";
$destination = "mailto:my.email@provider.nl?SUBJECT=Response";
tar = document.getElementsByTagName('a');
for (var q=0;q<tar.length;q++) {
if ( tar[q].href.indexOf( $target ) >= 0 ){
tar[q].href = $destination;
tar[q].setAttribute("target","_new");
}
}
</script>


The code finds a link with href contact.html ($target).

It then changes it to mailto: with subject ($destination).

Instead of an email address you can use an external link to a webpage.

To make the link to a webpage open in a new page, use the tar[q].setAttribute("target","_new");. Delete the line if not neeeded.

Last edit 11 years ago


Post Reply
You must login or signup to post.