These are chat archives for codeigniter-id/codeigniter-id.github.io

9th
Jun 2017
Samuele
@eleumas
Jun 09 2017 18:24

Hi, i have created a controller

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class About extends CI_Controller {

    public function index()
    {
    $this->load->view('header');
    $this->load->view('navbar');
    $this->load->view('about');
    $this->load->view('footer');
    }
}

how can i link the menu items with other pages?
I have to create a controller for each page (for example: home, about, services ecc)?

Aan Kurniawan
@aanlinuxer
Jun 09 2017 22:20
@eleumas there are some old but good tutorial on youtube https://youtu.be/62oIKVmnJeQ?list=PLpJNYusFedTiAjudOtKRh_MB-sTFvWgIJ

@eleumas The tutorial use codeigniter 2, but, the difference is minimal between codeigniter 2 and codeigniter 3.

For example class naming, CI 3 use Class_name ..not.. class_name (Ucfirst)
CI3 use $query->num_rows() ...not... $query->num_rows

If you downloaded codeigniter, thereis "user_guide" folder.. doubleclick "index.html" inside of "user_guide" folder... this is Codeigniter best survival guide..