gma / nesta

File Based CMS and Static Site Generator
http://nestacms.com
MIT License
902 stars 121 forks source link

Menus don't work when mounted at /path #68

Closed gma closed 12 years ago

gma commented 13 years ago

If you mount Nesta at a path in Rails such as /blog, the generated menus don't observe the mount path. This probably applies equally when mounted in any Rack app with Rack::Mount.

See http://librelist.com/browser//nesta/2011/9/12/menu-is-not-working-on-my-nesta-cms-on-rails3-integration/

Reported by @lgs.

gma commented 12 years ago

Should be fixed by #93.

mrnosal commented 12 years ago

The method current_item? in navigation.rb fails, though, since it is comparing the request.path to item.abspath. So it tries to compare "/path/about" to "/about" which always returns false.

def current_item?(item)
    request.path == item.abspath
end
gma commented 12 years ago

Cheers.