예제 #1
0
파일: menu.php 프로젝트: NazarK/timedesk
function menu_vertical($parent_id, $level = 0)
{
    $items = menu_items($parent_id);
    if ($level == "") {
        $level = 0;
    }
    $o = "";
    foreach ($items as $item) {
        $href = $item->link;
        if (!$href) {
            $href = "m/{$item->id}";
        }
        $o .= "<div class=menu_item level={$level} parent_id={$parent_id} item_id={$item->id}><a href={$href}>{$item->title}</a></div>";
        $o .= menu_vertical($item->id, $level + 1);
    }
    return $o;
}
예제 #2
0
				
				<a id="logo" href="<?php 
echo base_url();
?>
"><?php 
echo site_name();
?>
</a>
	
				<?php 
if (has_menu_items()) {
    ?>
				<nav id="main" role="navigation">
					<ul>
						<?php 
    while (menu_items()) {
        ?>
						<li <?php 
        echo menu_active() ? 'class="active"' : '';
        ?>
>
							<a href="<?php 
        echo menu_url();
        ?>
" title="<?php 
        echo menu_title();
        ?>
">
								<?php 
        echo menu_name();
        ?>
예제 #3
0
                            <span class="site-title" style="color: #<?php 
header_textcolor();
?>
;"><?php 
bloginfo('name');
?>
</span> <span class="site-description" style="color: #<?php 
header_textcolor();
?>
;"><?php 
bloginfo('description');
?>
</span>
                            <br>
                            <span class="page-title" style="color: #<?php 
header_textcolor();
?>
"><?php 
wp_title();
?>
</span>
                        </div>
                    </header>
                    <div id="nav">
                        <nav>
                            <?php 
menu_items();
?>
                        </nav>
                    </div><!-- nav -->
                    <div id="main">
예제 #4
0
		<header>
			<a class="logo" href="<?php 
echo base_url();
?>
"><?php 
echo site_name();
?>
</a>

			<?php 
if (has_menu_items()) {
    ?>
			<nav class="menu" role="navigation">
				<ul>
					<?php 
    while (menu_items(array('sortby' => 'name'))) {
        ?>
					<li <?php 
        echo menu_active() ? 'class="active"' : '';
        ?>
>
						<a href="<?php 
        echo menu_url();
        ?>
" title="<?php 
        echo menu_title();
        ?>
">
							<?php 
        echo menu_name();
        ?>
예제 #5
0
파일: menu.php 프로젝트: NazarK/sqp
function menu_with_images_and_links($parent_id)
{
    $items = menu_items($parent_id);
    foreach ($items as &$item) {
        if (!$item->link) {
            $page = page_id_by_title($item->title);
            if ($page) {
                $item->link = "p/{$page}";
            }
        }
        $item->img = db_result(db_query("SELECT link FROM images WHERE title='%s'", $item->title));
    }
    $o = "";
    foreach ($items as &$item) {
        $img = "";
        if ($item->img) {
            $img = "<img src={$item->img}>";
        }
        $o .= "<div class=menuItemDiv><a class=menuItem href={$item->link}>{$img}</a></div>";
    }
    return $o;
}