Commit 1195c14d authored by Otto Zaiser's avatar Otto Zaiser

Fix para que carguen las libraries solo en /tsa

parent de84f435
......@@ -61,27 +61,30 @@ function tsa_theme($existing, $type, $theme, $path) {
function tsa_preprocess_html(&$variables) {
$variables['#attached']['library'][] = 'tsa/tsa';
$path = $current_path = \Drupal::service('path.current')->getPath();
if($path == '/tsa') {
$variables['#attached']['library'][] = 'tsa/tsa';
$config = \Drupal::config('tsa.settings');
$tsa_api = $config->get('tsa_api');
$variables['#attached']['drupalSettings']['tsa']['tsa_api'] = $tsa_api;
$jsTxt01 = $config->get('jsTxt01');
$variables['#attached']['drupalSettings']['tsa']['jsTxt01'] = $jsTxt01;
$jsTxt02 = $config->get('jsTxt02');
$variables['#attached']['drupalSettings']['tsa']['jsTxt02'] = $jsTxt02;
$jsTxt03 = $config->get('jsTxt03');
$variables['#attached']['drupalSettings']['tsa']['jsTxt03'] = $jsTxt03;
$jsTxt04 = $config->get('jsTxt04');
$variables['#attached']['drupalSettings']['tsa']['jsTxt04'] = $jsTxt04;
$jsTxt05 = $config->get('jsTxt05');
$variables['#attached']['drupalSettings']['tsa']['jsTxt05'] = $jsTxt05;
$jsTxt06 = $config->get('jsTxt06');
$variables['#attached']['drupalSettings']['tsa']['jsTxt06'] = $jsTxt06;
$jsTxt07 = $config->get('jsTxt07');
$variables['#attached']['drupalSettings']['tsa']['jsTxt07'] = $jsTxt07;
$jsTxt08 = $config->get('jsTxt08');
$variables['#attached']['drupalSettings']['tsa']['jsTxt08'] = $jsTxt08;
$jsTxt09 = $config->get('jsTxt09');
$variables['#attached']['drupalSettings']['tsa']['jsTxt09'] = $jsTxt09;
$config = \Drupal::config('tsa.settings');
$tsa_api = $config->get('tsa_api');
$variables['#attached']['drupalSettings']['tsa']['tsa_api'] = $tsa_api;
$jsTxt01 = $config->get('jsTxt01');
$variables['#attached']['drupalSettings']['tsa']['jsTxt01'] = $jsTxt01;
$jsTxt02 = $config->get('jsTxt02');
$variables['#attached']['drupalSettings']['tsa']['jsTxt02'] = $jsTxt02;
$jsTxt03 = $config->get('jsTxt03');
$variables['#attached']['drupalSettings']['tsa']['jsTxt03'] = $jsTxt03;
$jsTxt04 = $config->get('jsTxt04');
$variables['#attached']['drupalSettings']['tsa']['jsTxt04'] = $jsTxt04;
$jsTxt05 = $config->get('jsTxt05');
$variables['#attached']['drupalSettings']['tsa']['jsTxt05'] = $jsTxt05;
$jsTxt06 = $config->get('jsTxt06');
$variables['#attached']['drupalSettings']['tsa']['jsTxt06'] = $jsTxt06;
$jsTxt07 = $config->get('jsTxt07');
$variables['#attached']['drupalSettings']['tsa']['jsTxt07'] = $jsTxt07;
$jsTxt08 = $config->get('jsTxt08');
$variables['#attached']['drupalSettings']['tsa']['jsTxt08'] = $jsTxt08;
$jsTxt09 = $config->get('jsTxt09');
$variables['#attached']['drupalSettings']['tsa']['jsTxt09'] = $jsTxt09;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment