Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
Fixed toggle class and view finder
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnetters committed Mar 10, 2017
1 parent acd9e5f commit b60d79e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/LanguageSwitcher/Command/RenderLanguageSwitcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ public function handle(
$toggle_title = $this->toggle_title ? $this->toggle_title : $current_locale . " <span class='caret'></span>"; // If the user has passed a button title set it, else default to the currently enabled locale.
$custom_title = $this->toggle_title != false; // Check if the user has set a custom title. Used in building the ul of locales

if (file_exists('../core/wirelab')) {
$views_dir = File::directories('../core/wirelab/language_switcher-plugin/resources/views'); // Get the dir within the addon dir
// Try to find the views folder
if (file_exists('../core/wirelab/language_switcher-plugin')) {
$views_dir = '../core/wirelab/language_switcher-plugin/resources/views'; // Get the dir within the addon dir
} elseif(file_exists(File::directories('../addons')[0] . '/wirelab/language_switcher-plugin/resources/views')) {
$views_dir = File::directories('../addons')[0] . '/wirelab/language_switcher-plugin/resources/views'; // Get the dir within the addon dir
} else {
Expand Down Expand Up @@ -94,11 +95,10 @@ public function handle(

$data = [
'container' => [ 'class' => $this->container_class ],
'toggle' => [ 'class' => $this->toggle_class ],
'toggle' => [ 'class' => $this->toggle_class, 'title' => $toggle_title ],
'ul' => [ 'class' => $this->ul_class ],
'li' => [ 'class' => $this->li_class ],
'a' => [ 'class' => $this->a_class ],
'toggle' => [ 'title' => $toggle_title],
'custom' => [ 'title' => $custom_title],
'locales' => $locales,
'current' => [
Expand Down

0 comments on commit b60d79e

Please sign in to comment.