Overwriting autonav view.php in a package

Permalink
I am trying to overwrite view.php found in the
concrete/blocks/autonav/view.php
directory.

It was my understanding that in my package I could add my own tweak of view.php file in
packages/my_package/blocks/autonav/view.php
but this does not seem to be the case.

I just want to overwrite the "selected" class from "nav-selected" to "active".

I don't want to edit the file in the concrete directory as some blog posts have suggested as this would break the site on updates and render my "theme" useless.

I am trying to change this as I am working with the "Header Nav" area.

This seems like it should be very trivial.

Thanks in advance.

 
tomiford replied on at Permalink Reply
The only documentation I can find that kind of helps you says you should do your overwrite in the
blocks/autonav
folder.

This does not help you though if you are trying to create a package. I would be interested to know the answer to this one as well.
mjl4975 replied on at Permalink Reply
Thanks for reply.

Is this not possible?
mjl4975 replied on at Permalink Best Answer Reply
From the lack of response I guess what I wanted to do is not possible. For newbies with a similar problem I had to use a custom template, calling it with the following code:

<?php  
    $bt_nav = BlockType::getByHandle('autonav');
    $bt_nav->controller->displayPages = 'top';
    $bt_nav->controller->orderBy = 'display_asc';
    $bt_nav->controller->displaySubPages = 'none';
    $bt_nav->render('templates/navbar');
?>