Assalamualaikum,..
//tampilan detailhalaman langsung menggunakan SEO (pages/namajudulseo)
<div class="col-md-12">
<section id="about" class="about">
<div class="container">
<div class="row no-gutters">
<div class="col-lg-6 video-box">
<img src="assets/img/about.jpg" class="img-fluid" alt="">
<a href="https://www.youtube.com/watch?v=jDDaplaOz7Q" class="venobox play-btn mb-4" data-vbtype="video" data-autoplay="true"></a>
</div>
<div class="col-lg-6 d-flex flex-column justify-content-center about-content">
<div class="section-title">
<h2>Tentang Kami</h2>
<p>
<?php
echo "$rows[isi_halaman]";
?>
</p>
</div>
</div>
</div>
</div>
</section>
</div>
//controller halaman
<?php
defined('BASEPATH') OR
exit('No direct script access allowed'); class Halaman extends CI_Controller {
public function detail(){
$last = end($this->uri->segments); $query = $this->model_utama->view_where_ordering_limit('halamanstatis',array('judul_seo'=>$last),'id_halaman','DESC',0,1); //$query = $this->model_utama->view_where_ordering_limit('cms_pages',array('seo_title'=>$this->uri->segment(3)),'id_pages','DESC',0,1);
if ($query->num_rows()<=0){
redirect('main');
}else{
$row = $query->row_array();
$data['title'] = cetak($row['judul']);
$data['description'] = cetak_meta($row['isi_halaman'],0,500);
$data['keywords'] = cetak($row['judul']);
$data['rows'] = $row;
$dataa = array('dibaca'=>$row['dibaca']+1); $where = array('id_halaman' => $row['id_halaman']); $this->model_utama->update('halamanstatis', $dataa, $where);
//$data['disqus'] = $this->disqus->get_html();
$this->template->load(template().'/template',template().'/detailhalaman',$data);
}
}
}
//template
<!DOCTYPE HTML>
<html lang = "en">
<head>
<title><?php echo $title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow">
<meta name="description" content="<?php echo $description; ?>">
<meta name="keywords" content="<?php echo $keywords; ?>">
<meta name="author" content="phpmu.com">
<meta name="robots" content="all,index,follow">
<meta http-equiv="Content-Language" content="id-ID">
<meta NAME="Distribution" CONTENT="Global">
<meta NAME="Rating" CONTENT="General">
<link rel="canonical" href="<?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>"/>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,600,600i,700,700i,900" rel="stylesheet">
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/icofont/icofont.min.css" rel="stylesheet">
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet">
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/animate.css/animate.min.css" rel="stylesheet">
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/venobox/venobox.css" rel="stylesheet">
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/aos/aos.css" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="template/<?php echo template(); ?>/<?php echo background(); ?>/css/style.css" rel="stylesheet">
</head>
<?php include "header.php"; ?>
<body>
<main id="main">
<section class="py-5">
<?php echo $contents; ?>
<div class="clear-float"></div>
</section>
</main>
<footer id="footer">
<?php include"footer.php"; ?>
</footer><!-- End Footer -->
<a href="#" class="back-to-top"><i class="icofont-simple-up"></i></a>
<!-- Vendor JS Files -->
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/jquery/jquery.min.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/jquery.easing/jquery.easing.min.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/php-email-form/validate.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/owl.carousel/owl.carousel.min.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/jquery-sticky/jquery.sticky.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/venobox/venobox.min.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/waypoints/jquery.waypoints.min.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/counterup/counterup.min.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/vendor/aos/aos.js"></script>
<!-- Template Main JS File -->
<script src="template/<?php echo template(); ?>/<?php echo background(); ?>/js/main.js"></script>
</body>
</html>