OmekaS

[version française]

To edit the ValueSuggest module for Omeka-S to index your thesaurus handle by Opentheso

  1. Install the ValuSuggest module
  2. Go to the folder (homeOmekaS/modules/ValueSuggest/src/Suggester/Pactols)
  3. Edit the file (PactolsAll.php), and adapt the information about you thesaurus:

$lang = $lang ?: ‘fr‘;

        $params = [‘q’ => $query, ‘lang’ => $lang, ‘theso’ => ‘th267’, ‘format’ => ‘jsonld’];

        $response = $this->client

            ->setUri(‘https://opentheso.huma-num.fr/opentheso/api/search’)

            ->setParameterGet($params)

            ->send();

        if (!$response->isSuccess()) {

            return [];

        }

  1. Get back in OmekaS and activate the ValueSuggest module
  2. Add (Resource templates)
  • Edit the data type for this field (Subject) and choose (PactolsAll)
  • Add an item, choose the template (Sujets)
  • Into the field (Subject), enter some letters, the autocompletion will activate to propose you corresponding terms
  •  !!!! Whatch out !!!!!  to make it works on an Opentheso serveur with the https protocole, OmekaS must be installed with https protocole too

Vous aimerez aussi...

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.

Rechercher dans OpenEdition Search

Vous allez être redirigé vers OpenEdition Search