Welcome Guest, Not a member yet? Register   Sign In
Load different data depending on URL?
#10

[eluser]techgnome[/eluser]
See if this works:
Code:
<?php

if ($param3 === FALSE)
{
    // If there is no Paramer 3... check #2
    if ($param2 === FALSE)
    {
        // If there is no Parameter 2... check #1
        if($param1 === FALSE)
        {
            // No parameters given
                        
        } else {
            // Load Country info
            $data['entries'] = $this->Mains->get_entries($param_1);
            $data['title'] = 'country';  
            $data['main'] = 'public_news';
            $this->load->vars($data);
            $this->load->view('template');
        }
    } else {
        // Load city information
        $data['entries'] = $this->Mains->get_entries($param_1, $param_2);
        $data['title'] = 'city';  
        $data['main'] = 'public_page';
        $this->load->vars($data);
        $this->load->view('template');
    }
} else {
    // Load Category information
    $data['entries'] = $this->Mains->get_entries($param_1, $param_2, $param_3);
    $data['title'] = 'category';  
    $data['main'] = 'public_page';
    $this->load->vars($data);
    $this->load->view('template');
}

-tg


Messages In This Thread
Load different data depending on URL? - by El Forum - 10-23-2010, 09:35 AM
Load different data depending on URL? - by El Forum - 10-23-2010, 10:40 AM
Load different data depending on URL? - by El Forum - 10-23-2010, 10:41 AM
Load different data depending on URL? - by El Forum - 10-23-2010, 10:47 AM
Load different data depending on URL? - by El Forum - 10-23-2010, 10:51 AM
Load different data depending on URL? - by El Forum - 10-23-2010, 12:51 PM
Load different data depending on URL? - by El Forum - 10-23-2010, 01:13 PM
Load different data depending on URL? - by El Forum - 10-23-2010, 02:40 PM
Load different data depending on URL? - by El Forum - 10-23-2010, 03:20 PM
Load different data depending on URL? - by El Forum - 10-23-2010, 08:46 PM
Load different data depending on URL? - by El Forum - 10-24-2010, 01:21 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 01:28 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 01:41 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 01:52 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 02:12 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 04:04 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 04:45 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 04:48 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 04:50 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 05:03 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 05:04 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 05:05 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 05:06 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 05:09 AM
Load different data depending on URL? - by El Forum - 10-24-2010, 05:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB