placed some block on basic theme, corpus library is now loaded by entreesblock theme array

This commit is contained in:
Bachir Soussi Chiadmi
2018-01-07 16:13:47 +01:00
parent e798d5976c
commit 898b06f049
14 changed files with 86 additions and 58 deletions
@@ -14,8 +14,8 @@
function edlp_corpus_page_attachments(array &$attachments) {
//add here any conditions if you need to limit the pages
if (\Drupal::service('path.matcher')->isFrontPage()) {
$attachments['#attached']['library'][] = 'edlp_corpus/corpus';
$attachments['#attached']['drupalSettings']['basepath'] = base_path();
// $attachments['#attached']['library'][] = 'edlp_corpus/corpus';
// $attachments['#attached']['drupalSettings']['basepath'] = base_path();
// $attachments['#attached']['drupalSettings']['pathtoedlpcorpus'] = base_path() . drupal_get_path('module', 'edlp_corpus');
// $attachments['#attached']['drupalSettings']['pathtotfiles'] = PublicStream::basePath();
}
@@ -101,6 +101,12 @@ class BlockEntrees extends BlockBase {
return array (
'#theme' => 'item_list',
'#items' => $entrees,
'#attached'=>array(
'library' => array('edlp_corpus/corpus'),
'drupalSettings' => array(
'basepath' => base_path()
)
)
);
}