ckanext-scheming icon indicating copy to clipboard operation
ckanext-scheming copied to clipboard

PACKAGE_FORM

Open AnjaStemme opened this issue 9 years ago • 2 comments

I am trying to add further functionality to the scheming extension and would thus require to provide a modified package_form template in my own extension.

However, it seems to be impossible to get CKAN to recognize any other package_form besides the one in the scheming extension when using it.

Could you provide an hint how to do it?

AnjaStemme avatar Oct 27 '16 14:10 AnjaStemme

You can either override scheming's form template from a different plugin (make sure your plugin is first in the config) or you can subclass the SchemingDatasets plugin to override the method that returns the form template path, then register your subclass instead of the scheming one.

The first option is simpler. You haven't described what further functionality you're building though, so I can't tell what to recommend.

wardi avatar Oct 27 '16 14:10 wardi

Thanks a lot for your response! The solution was to load my plugin first, store the package_form in the scheming subfolder in my plugin and include ckan_extends in my package_form :-) Now it appears to work. Thanks a lot. I am working on a Metadata_Editor extension including tabs to group the fields.

AnjaStemme avatar Oct 28 '16 07:10 AnjaStemme