本文整理汇总了PHP中render_navigation函数的典型用法代码示例。如果您正苦于以下问题:PHP render_navigation函数的具体用法?PHP render_navigation怎么用?PHP render_navigation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了render_navigation函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_navigation
/**
* render_navigation()
*/
function render_navigation($depth = -1, $tree = NULL, &$html = '', $level = 0, $preroute = '')
{
$html .= $level > 0 ? '<ul class="sub l' . $level . '">' : '<ul>';
if (is_null($tree)) {
$tree = Lang::get('routes');
}
foreach ($tree as $route => $item) {
if (isset($item['nav']) && $item['nav'] != NULL) {
$active = $route == Route::currentRouteName();
if ($route == 'news' && substr(Route::currentRouteName(), 0, 5) == 'news.') {
$active = true;
}
$html .= '<li>';
$html .= '<a href="' . route($route) . ($route == 'home' ? '/' : '') . '"' . ($active ? ' class="active"' : '') . '>' . $item['nav'] . '</a>';
if (isset($item['sub']) && is_array($item['sub'])) {
if ($depth == -1 || $level < $depth) {
render_navigation($depth, $item['sub'], $html, $level + 1, $preroute . $route . '.sub.');
}
}
$html .= '</li>';
}
}
$html .= '</ul>';
return $html;
}
示例2: render_navigation
<h3><?php
render_navigation($db);
?>
» <?php
hm("create_collection_full");
?>
</h3>
<?php
if (isset($message)) {
?>
<p class="message">
<?php
h($message);
?>
</p>
<script language="javascript">
window.parent.frames["left"].location.reload();
</script>
<?php
}
?>
<form method="post">
<?php
hm("name");
?>
:<br/>
<input type="text" name="name" value="<?php
h($name);
?>
示例3: render_navigation
<h3><?php
render_navigation($db, $realName, false);
?>
» <?php
hm("rename");
?>
</h3>
<?php
if (isset($error)) {
?>
<p class="error"><?php
h($error);
?>
</p>
<?php
}
if (isset($message)) {
?>
<p class="message"><?php
h($message);
?>
</p>
<?php
}
?>
<form method="post">
<input type="hidden" name="oldname" value="<?php
h_escape($realName);
?>
示例4: h
?>
currentFields.push("<?php
h(addslashes($field));
?>
");
<?php
}
?>
$(function() {
$("input[name='field[]']").autocomplete({ source:currentFields, delay:100 });
});
</script>
<h3><?php
render_navigation($db, $collection);
?>
» <a href="<?php
h(url("collection.collectionIndexes", array("db" => $db, "collection" => $collection)));
?>
"><?php
hm("indexes");
?>
</a> » <?php
hm("create");
?>
</h3>
<?php
if (isset($message)) {
?>
示例5: h
h(filemtime("js/collection.js"));
?>
"></script>
<script language="javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
<link rel="stylesheet" href="<?php
render_theme_path();
?>
/css/collection.css" media="all"/>
<link rel="stylesheet" href="<?php
render_theme_path();
?>
/css/jquery-ui-1.8.4.smoothness.css" media="all"/>
<a name="page_top"></a>
<h3><?php
render_navigation($db, $collection, false);
?>
</h3>
<div class="operation">
<strong><?php
hm("query");
?>
</strong>[<a href="<?php
h($arrayLink);
?>
" <?php
if (x("format") == "array") {
?>
style="text-decoration:underline"<?php
}
?>
示例6: elseif
} elseif (tpl_getConf('sidebar') == 'right') {
?>
<?php
if (!tpl_sidebar_hide()) {
?>
<div class="left-page">
<div id="page"><?php
$notoc ? tpl_content(false) : tpl_content();
?>
</div>
</div>
<div class="right-sidebar">
<div class="menu">
<?php
render_navigation(":menu");
?>
</div>
<?php
tpl_sidebar('right');
?>
</div>
<?php
} else {
?>
<div id="page" class="page">
<?php
tpl_content();
?>
示例7: render_navigation
function render_navigation($data, $classname = 'nav')
{
global $user, $module, $submodule, $method, $page;
?>
<ul class="<?php
echo $classname;
?>
">
<?php
foreach ($data as $link) {
$path = (isset($link['module']) ? $link['module'] : '') . (isset($link['module']) && isset($link['method']) ? '/' : '') . (isset($link['method']) ? $link['method'] : '');
if (!isset($link['module'])) {
$link['module'] = 'index';
}
if (!isset($link['method'])) {
$link['method'] = 'index';
}
if (!function_exists('checkIfAuthorized') || checkIfAuthorized($user, $link['module']) !== false) {
?>
<li<?php
echo ($module == $link['module'] || $module . '/' . $submodule == $link['module']) && ($method == $link['method'] || $page == $link['method']) ? ' class="current"' : '';
?>
>
<?php
if (isset($link['submenu'])) {
?>
<label>
<?php
echo isset($link['icon']) ? '<i class="fa ' . $link['icon'] . '"></i> ' : '';
?>
<input type="checkbox" class="nav-chk" name="<?php
echo str_replace('/', '-', $path);
?>
"><?php
echo $link['title'];
?>
</label>
<?php
render_navigation($link['submenu']);
} else {
?>
<a href="<?php
echo BASE_URL . $path;
?>
"><?php
echo isset($link['icon']) ? '<i class="fa ' . $link['icon'] . '"></i> ' : '';
echo $link['title'];
?>
</a>
<?php
}
?>
</li>
<?php
}
}
?>
</ul>
<?php
}
示例8: array
" /></a></li>
<?php
}
?>
</ul>
<?php
$navigation = array();
$navigation[] = array('title' => 'Users', 'icon' => 'fa-user', 'module' => 'admin', 'method' => 'users');
$navigation[] = array('title' => 'Groups', 'icon' => 'fa-users', 'module' => 'admin', 'method' => 'groups');
$navigation[] = array('title' => 'Errors', 'icon' => 'fa-exclamation-triangle', 'module' => 'admin', 'method' => 'errors');
$navigation[] = array('title' => 'Database', 'icon' => 'fa-database', 'module' => 'admin/developer', 'method' => 'database');
$navigation[] = array('title' => 'Version Control', 'icon' => 'fa-upload', 'module' => 'admin/developer', 'method' => 'vcs');
$navigation[] = array('title' => 'Inquiry', 'icon' => 'fa-envelope-o', 'module' => 'admin', 'method' => 'inquiry');
$navigation[] = array('title' => 'Pages', 'icon' => 'fa-newspaper-o', 'module' => 'admin', 'method' => 'pages');
$navigation[] = array('title' => 'View Site', 'icon' => 'fa-globe', 'module' => 'index');
render_navigation($navigation);
?>
</div>
</nav>
<main class="container">
<?php
flash_message_dump();
echo $yield;
?>
</main>
<script src="<?php
echo BASE_URL_STATIC;
?>
js/script.js"></script>
</body>
</html>
示例9: render_navbar_template
/**
* Renders the navbar template with the specified navbits
*
* @param array Array of navbit information
*
* @return string Navbar HTML
*/
function render_navbar_template($navbits)
{
// VB API doesn't require rendering navbar.
if (defined('VB_API') and VB_API === true) {
return true;
}
$navigation = render_navigation();
$templater = vB_Template::create('navbar');
$templater->register('navigation', $navigation);
$templater->register('ad_location', $GLOBALS['ad_location']);
$templater->register('foruminfo', $GLOBALS['foruminfo']);
$templater->register('navbar_reloadurl', $GLOBALS['navbar_reloadurl']);
$templater->register('navbits', $navbits);
$templater->register('notices', $GLOBALS['notices']);
$templater->register('notifications_menubits', $GLOBALS['notifications_menubits']);
$templater->register('notifications_total', $GLOBALS['notifications_total']);
$templater->register('pmbox', $GLOBALS['pmbox']);
$templater->register('return_link', $GLOBALS['return_link']);
$templater->register('template_hook', $GLOBALS['template_hook']);
return $templater->render();
}