|
@@ -9,6 +9,7 @@
|
|
|
|
|
|
use Drupal\Core\Entity\EntityInterface;
|
|
|
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
|
|
|
+use Drupal\Core\Url;
|
|
|
|
|
|
/**
|
|
|
* Implements hook_theme().
|
|
@@ -137,6 +138,9 @@ function edlp_corpus_page_attachments(array &$attachments) {
|
|
|
|
|
|
$attachments['#attached']['drupalSettings']['edlp_corpus']['colors'] = $js_list;
|
|
|
|
|
|
+ // load corpus
|
|
|
+ $url = Url::fromRoute('edlp_corpus.corpusjson');
|
|
|
+ $attachments['#attached']['drupalSettings']['edlp_corpus']['load_corpus_ajax_url'] = $url->getInternalPath();
|
|
|
}
|
|
|
|
|
|
|