示例#1
0
<?php

// declared here so we don't have to in controller variable files'
$CI =& get_instance();
// generic global page variables used for all pages
$vars = array();
$vars['layout'] = 'main';
$vars['page_title'] = fuel_nav(array('render_type' => 'page_title', 'delimiter' => ' : ', 'order' => 'desc', 'home_link' => 'My Website'));
$vars['meta_keywords'] = '';
$vars['meta_description'] = '';
$vars['js'] = '';
$vars['css'] = '';
$vars['body_class'] = $CI->uri->segment(1) . ' ' . $CI->uri->segment(2);
// page specific variables
$pages = array();
示例#2
0
  <tr>
    <td><a href="<?php 
    echo $this->config->item('base_url');
    ?>
auth/logout">[Logout]</a></td>
    <td align="left"><a href="<?php 
    echo $this->config->item('base_url');
    ?>
change_email">[Change Email]</a></td>
  </tr>
  </table>

            
    <?php 
}
?>
  </div>
		<div id="header">	
			<h1><?php 
echo fuel_var('Site name');
?>
</h1>
		</div>
		<div id="navigation" class="menu">
			<?php 
echo fuel_nav();
?>
		</div>
		<div id="main">
        	
			
示例#3
0
<?php

/***************************************************************
ATTENTION: There is a static view file of sitemap_xml.php that 
can be used to create sitemaps outside of creating a CMS page
**************************************************************/
fuel_set_var('layout', '');
$default_frequency = 'Monthly';
$nav = fuel_nav(array('return_normalized' => TRUE));
$used = array();
/***************************************************************
Add any dynamic pages and associate them to the $nav array here:
**************************************************************/
$modules = $CI->fuel->pages->options_list('modules', FALSE, FALSE);
$nav = array_merge($nav, $modules);
$nav[''] = '';
unset($nav['home']);
/**************************************************************/
if (empty($nav)) {
    show_404();
}
header('Content-type: text/xml');
// needed because of the Loader class mistaking the end of the xml node as PHP in load->view
echo str_replace(';', '', '<?xml version="1.0" encoding="UTF-8"?>');
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
        http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<?php 
foreach ($nav as $uri => $page) {
 public function test_fuel_nav()
 {
     $expected = strip_whitespace('<ul><li class="first last"><a href="' . site_url('test') . '">Test</a></li></ul>');
     $test = strip_whitespace(fuel_nav());
     $this->run($test, $expected, 'Test for successful fuel_nav() rendering');
 }