コード例 #1
0
ファイル: menu_left.php プロジェクト: rodsanjo/3da2
<ul class='menu_left'>
    <?php 
$menu = \modelos\Menus::get_menuLeft();
foreach ($menu as $key => $item) {
    if (!is_array($item)) {
        $item = explode(",", $item);
        $href = \core\URL::generar("{$item['0']}/{$item['1']}");
        //$title = ucwords( iText($item[2], 'dicc') );
        $title = ucwords($item[2]);
        //$texto = \core\Idioma::text($key, 'dicc');
        $texto = $key;
        echo "\n                    <li class='item' title='{$title}'>\n                        <a href='{$href}'>{$texto}</a>\n                    </li>\n                    ";
    } else {
        ?>
                <li class='item has-sub'><a><?php 
        echo \core\Idioma::text($key, 'dicc');
        ?>
</a>
                    <ul>
                        <?php 
        foreach ($item as $key => $subitem) {
            $subitem = explode(",", $subitem);
            $href = \core\URL::generar("{$subitem['0']}/{$subitem['1']}/{$subitem['2']}");
            $title = ucwords($subitem[3]);
            $texto = $key;
            //$texto = \core\Idioma::text($key, 'dicc');
            echo "\n                                <li class='subitem' title='{$title}'>\n                                    <a href='{$href}'>{$texto}</a>\n                                </li>\n                                ";
        }
        ?>
                                
                    </ul>
コード例 #2
0
ファイル: menu_up.php プロジェクト: rodsanjo/3da2
<ul class='menu_up'>
    <?php 
$menu = \modelos\Menus::get_menuUp();
foreach ($menu as $key => $item) {
    if (!is_array($item)) {
        $item = explode(",", $item);
        $href = \core\URL::generar("{$item['0']}/{$item['1']}");
        $title = ucfirst(iText($item[2], 'dicc'));
        $texto = ucfirst(\core\Idioma::text($key, 'dicc'));
        echo "\n                    <li class='item' title='{$title}'>\n                        <a href='{$href}'>{$texto}</a>\n                    </li>\n                    ";
    } else {
        ?>
                <li class='item has-sub'> <a><?php 
        echo ucfirst(\core\Idioma::text($key, 'dicc'));
        ?>
</a>
                    <ul>
                        <?php 
        foreach ($item as $key => $subitem) {
            $subitem = explode(",", $subitem);
            $href = \core\URL::generar("{$subitem['0']}/{$subitem['1']}");
            $title = ucfirst(iText($item[2], 'dicc'));
            $texto = ucfirst(\core\Idioma::text($key, 'dicc'));
            echo "\n                                <li class='subitem' title='{$title}'>\n                                    <a href='{$href}'>{$texto}</a>\n                                </li>\n                                ";
        }
        ?>
                                
                    </ul>                            
                </li>
<?php 
    }