Add additional context metadata through plugin

Hi there,

I’m just working on creating one additional plugin for CRAFT, that will enhance the Journal metadata.

I can do it by adding fields to the setting option of the plugin, it’s easy, but it store metadata in database under plugin_settings.

Is there a way how to use this model for journal/context instead of section?

# Handle COAR resource types in section forms - older OJS 
            HookRegistry::register('sectiondao::getAdditionalFieldNames', array($this, 'addSectionDAOFieldNames'));
            HookRegistry::register('Templates::Manager::Sections::SectionForm::AdditionalMetadata', array($this, 'addSectionFormFields'));
            HookRegistry::register('sectionform::initdata', array($this, 'initDataSectionFormFields'));
            HookRegistry::register('sectionform::readuservars', array($this, 'readSectionFormFields'));
            HookRegistry::register('sectionform::execute', array($this, 'executeSectionFormFields'));

# Handle COAR resource types in section forms - newer OJS
			Hook::add('Schema::get::section', [$this, 'addToSchema']);
			Hook::add('Templates::Manager::Sections::SectionForm::AdditionalMetadata', array($this, 'addSectionFormFields'));
			Hook::add('sectionform::initdata', array($this, 'initDataSectionFormFields'));
			Hook::add('sectionform::readuservars', array($this, 'readSectionFormFields'));
			Hook::add('sectionform::execute', array($this, 'executeSectionFormFields'));

Thank you very much.
Sincerely,
Radek

Hi @Radek,

I think you mean to add the journal metadata to journal_settings, not plugin_settings, right?

Are you coding for 3.3.0-x or 3.4.0-x?

Thanks,
Alec Smecher
Public Knowledge Project Team