Esempio n. 1
0
 /**
  * Returns the url of the site
  *
  * @return string
  */
 public function url($lang = false)
 {
     if ($lang) {
         // return the specific language url
         return $this->languages->find($lang)->url();
     } else {
         return parent::url();
     }
 }
Esempio n. 2
0
 /**
  * Constructor
  */
 public function __construct(Kirby $kirby)
 {
     parent::__construct($kirby);
     $this->languages = new Languages($this);
     foreach ($kirby->options['languages'] as $lang) {
         $language = new Language($this, $lang);
         // store the default language
         if ($language->default) {
             $this->defaultLanguage = $language;
         }
         // add the language to the collection
         $this->languages->data[$language->code] = $language;
     }
 }
Esempio n. 3
0
 public function __construct()
 {
     parent::__construct();
     $this->prependSiteTitle(lang('Home.Home'));
     $this->mainMenu->getItem(0)->addClass('active');
 }