Override ResourceGrid config via overrideLocalConfig
has only effect for non-paged views
#1916
Labels
bug
Something isn't working
Describe the bug
Making config changes, e.g. adding a new entry to the "Add Resource" menu, via
overrideLocalConfig
does not work for the root route/
. It only works for paged views like/catalogue
.For the given example (adding menu entry to
ResourceGrid
config), the parametersmenuItems
andfilterFormItems
are not available for override. These are not yet set in theoverrideLocalConfig
as these are set later onResourceGrid
creation (as default function parameters). One would have to provide the whole arrays (see this example) in the_geonode_config.html
instead of patching existing config.Expected Behavior
On startup, GeoNode reads and sets overridden configuration declared in
_geonode_config.html
as documented.Steps to Reproduce the Problem
CARDS_MENU
placeholder_geonode_config.html
:/catalogue
--> the menu is not there (expected)/
--> the menu is visible (overridden config not applied)Specifications
v4.4.x
(but older version had the same behaviour)Configuration overrides are read and applied only from the last configured contrib module. However, this can be addressed by updating the documentation (and existing config overrides) as described in my comment on a geonode-subsites PR:
EDIT: It is necessary to wrap the above as IIFE to encapsulate the
overrideLocalConfig
variable as multiple overrides may appear in the html, i.e. doThe text was updated successfully, but these errors were encountered: