Add Title to the Nav-Link

Permalink
Hello

i'm not sure, that is the right forum for it.
is it possible to add the title attribute to a nav-link

we use the genesis theme, and when we make a seo check, we get the error, that the title is missing

in the header.php of the theme there is only this entry

<?php
$a = new GlobalArea('Header Navigation');
$a->display();
?>

thank you in advance for your help!

 
JohntheFish replied on at Permalink Reply
JohntheFish
If its not already there, you will need to create a custom template for the autonav that outputs the title attribute to the html.

See the c5 docs for how to create a custom block template.
You will need to start from the autonav block template your theme currently uses.
There are plenty of comments in an autonav template giving further hints about customisation.
ConcreteOwl replied on at Permalink Best Answer Reply
ConcreteOwl
In the Genesis theme you should have an autonav templates folder, within this folder are several autonav templates..
Using the 'c5box_headernav' template as an example, you will see this line of code
echo '<li class="' . $ni->classes . '">'; //opens a nav item

change that line to this...
echo '<li class="' . $ni->classes . '" title="' . $ni->name . '">'; //opens a nav item

And that will give you the page name as a title
To use the template in your header nav, put a page into edit mode and left click the autonav block and then choose 'Design & Custom Template', in the window that appears click the little gear wheel and then click 'Custom Template, choose the one you edited and save...

You will find the template files in c5box_genesis/blocks/autonav/templates
e4u replied on at Permalink Reply
Hello,

thank you for the solution! this works.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Your'e very welcome.