ckan / ckanext-pages

A simple builtin CMS for CKAN sites
GNU General Public License v3.0
51 stars 101 forks source link

"ckanext.pages.about_menu = False" does not remove About link from nav bar. #82

Closed hughstimson closed 5 years ago

hughstimson commented 5 years ago

I'm using CKAN v2.8.2.

According to the docs,

This module also gives you a quick way to remove default elements from the CKAN menu and you may need todo this in order for you to have space for the new items you add. These options are:

ckanext.pages.about_menu = False ckanext.pages.group_menu = False ckanext.pages.organization_menu = False

These settings work for group and organization, but do not affect about.

It looks like this can be resolved in plugin.py line 32 by changing

new_args = []
    for arg in args:
        if arg[0] == 'about' and not about_menu:
            continue

to

new_args = []
    for arg in args:
        if arg[0] == 'home.about' and not about_menu:
            continue
metaodi commented 5 years ago

@hughstimson nice catch! Could you create a PR for this?

Note: this extensions is designed to work on multiple versions of CKAN, so the code should check for home.about (new name of route) and about (old name of route).

hughstimson commented 5 years ago

Yup, can do a PR soon.

jonathansberry commented 5 years ago

I've also spotted this issue. Since no PR appears to have been opened in the past few months, I've just opened one myself. :point_up: Thanks to @hughstimson for explaining the fix.

hughstimson commented 5 years ago

Thanks @jonathansberry, I started this, got confused about how to test across versions, stopped and have been feeling vaguely guilty about it for weeks. :)

gallexme commented 5 years ago

Any Updates?

amercader commented 5 years ago

This is now fixed with #83