public function pages()
 {
     $get_page = Page::getPageBySlug(Input::get('p'));
     $title = $get_page[0]->title;
     return View::make('home.pages')->with(['page' => $get_page, 'title' => $title]);
 }
Example #2
0
<?php

/*
 *      slug.php
 *      
 *      Copyright 2010 nitzan <nitzan@nitzan-laptop>
 *      
 */
global $sitemap;
if (isset($sitemap['location'])) {
    $slug = $sitemap['location'];
} else {
    die(_e('You are not suppose to be here'));
}
$page = new Page();
$page->getPageBySlug($slug);
get_top_nav();
//Call the navigation
?>

<div id="wrap">
	<div id="widecb">
		<div id="additemnav">
			<ul>
			<?php 
$pages = getAllPages();
foreach ($pages as $page) {
    ?>
					<li><a href="<?php 
    echo HOME . $page->slug;
    ?>