Edit Navigation bar view.php to add title attribute to the links

Permalink
Hi all!

Thank you very much in advance for helping!

I have this code, slightly modified from navigation bar's view.php file

if ($c->getCollectionID() == $_c->getCollectionID()) {
echo('<li class="currentpage nav-path-selected"><a class="nav-selected nav-path-selected" ' . $target . ' href="' . $pageLink . '">' . $ni->getName() . '</a>');
  } elseif ( in_array($_c->getCollectionID(),$selectedPathCIDs) ) {
  echo('<li class="nav-path-selected"><a class="nav-path-selected" href="' . $pageLink . '" ' . $target . '>' . $ni->getName() . '</a>');
  } else {
  echo('<li><a href="' . $pageLink . '" ' . $target . 'title="' . $_c->getCollectionName() . '" >' . $ni->getName() . '</a>');
  }
  $lastLevel = $thisLevel;
  $i++;


So currently, in the title attribute I'm getting the page name, but I'd like to get page's title, which I added through:
Site map > click on a page and select Properties > Custom Attributes > Meta Title

Any ideas?

Cheers!

RafaelGP
 
RafaelGP replied on at Permalink Reply
RafaelGP
Any one please?
adajad replied on at Permalink Best Answer Reply
adajad
$c->getAttribute('meta_title')
RafaelGP replied on at Permalink Reply
RafaelGP
Brilliant!

Thank you very very much!

I had to add an underscore to make it work, like this:

$_c->getAttribute('meta_title')


Cheers!