Changing HOME name in autonav

Permalink 1 user found helpful
I haven't found an answer in the forum so I'm posting a new thread.

I want to change the root HOME page's name to something else. It appears in autonav and that's fine - it's just called HOME and I want it to be called something else.

I changed the home page's name and it appears with the new name in dahsboard's sitemap and the home page's properties, but it doesn't change its name in autonav.

Any suggestions?

Thanks

 
MadQuint replied on at Permalink Best Answer Reply
Hey spidersilver,

manually changing it's name shouldn't be a hassle.

Simply edit the theme your autonav block is using. If you're using the default theme then edit /yoursite/concrete/blocks/autonav/view.php.

Add:
if($_c->getCollectionID() == 1){
  $cName = 'new home name';
}else{   
  $cName = $ni->getName();   
}

right after after:
$_c = $ni->getCollectionObject();

which is found in the foreach statement.

Then replace ALL
$ni->getName()

with
$cName
.

That should do the trick.

if any dramas let me know.
spidersilver replied on at Permalink Reply
quinteroDesigns,
No dramas and it worked like a charm.
Thanks!

I actually changed the HOME page's name but only your trick did it. Now if I can only find the page's name attribute then I get your code to be generic without the need to explicitly spell out the HOME page's new name within view.php
jeramy replied on at Permalink Reply
jeramy
Try:
$c->getCollectionName();
MadQuint replied on at Permalink Reply
in this case $_c->getCollectionName() but otherwise jedspurg said it all