Changeset 348 in t29-www for lib


Ignore:
Timestamp:
Mar 6, 2013, 4:06:03 AM (11 years ago)
Author:
sven
Message:

Kleiner Fix, sodass auch Links im Menue und ein paar Header-Links
bereinigt erscheinen (ohne Dateiendung).

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/menu.php

    r347 r348  
    6464        }
    6565
    66         function convert_news_data() {
     66        /**
     67         * Liest das YAML-formatierte News-Menue aus der news.php-File der entsprechenden
     68         * Sprache aus und erzeugt daraus ein HTML-Menue, welches als String zurueckgegeben
     69         * wird.
     70         * @param $host Instance of t29Host which can be used for link rewriting if given.
     71         **/
     72        function convert_news_data($host=null) {
    6773                require $this->conf['lib'].'/spyc.php';
    6874                $data = Spyc::YAMLLoad($this->load_news_data());
     
    7783                        } else {
    7884                                $url = ($e['link']{0} == '#' ? $this->conf['lang_path'].'/'.self::news_file : '').$e['link'];
     85                                if($host)
     86                                        $url = $host->rewrite_link($url);
    7987                                $li = "<li><a href='$url'>$e[titel]<span class='hidden'>: </span><em>$e[text]</em></a></li>";
    8088                        }
     
    271279                if($xpath_menu_selection == self::horizontal_menu) {
    272280                        # inject news
    273                         $news_ul_content = $this->convert_news_data();
     281                        $news_ul_content = $this->convert_news_data($host);
    274282                        $magic_comment = '<!--# INSERT_NEWS #-->';
    275283                        $menu = $xml->ul->asXML();
  • lib/template.php

    r347 r348  
    232232  ?>
    233233 
    234   <link rel="copyright" href="<?php $href($p('footer-legal-file')); ?>" title="<?php $href($p('footer-legal-link')); ?>">
    235   <link rel="search" type="application/opensearchdescription+xml" href="<?php $href($p('topnav-search-page')); print '?action=opensearch-desc&amp;lang='.$this->conf['lang']; ?>" title="<?php $p('opensearch-desc'); ?>">
     234  <link rel="copyright" href="<?php print $href($_('footer-legal-file')); ?>" title="<?php $p('footer-legal-link'); ?>">
     235  <link rel="search" type="application/opensearchdescription+xml" href="<?php print $href($_('topnav-search-page')); print '?action=opensearch-desc&amp;lang='.$this->conf['lang']; ?>" title="<?php $p('opensearch-desc'); ?>">
    236236  <?php
    237237        // print interlanguage links for all languages except the active one
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License