Welcome Guest, Not a member yet? Register   Sign In
Removing Page/id's ?...
#1

[eluser]masson[/eluser]
Hey Guys,

I have been working on a personal small CMS, so for it is going quite nice. However i have some issues changing the URL rewriting for pages.

Now it's http://www.mydomain.com/page/2/services but what i really wan't is http://www.mydomain.com/services

I'm getting quite a headache since i know it can't be that hard. I really would appreciate if any one could help me out.

Regards,
Masson
#2

[eluser]überfuzz[/eluser]
Could you give an example of how you set up a controller to your site. Lets say you have a page called home.

Code:
<? if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends MY_Controller
{
    function Home()
    {
        parent::__construct();
    }
    

    function index()
    {
        $this->data['some_data'] = 'some_data';
        $this->load->view('home', $this->data);
     }
}
#3

[eluser]überfuzz[/eluser]
Ops, hard to get the point in my post. Do you think CI when you set up your controller/pages? There are ways of setting up a dynamic page system. But do you really need that for a small personal site?
#4

[eluser]w0bbes[/eluser]
Any examples on how to setup a dynamic page system, ive been wondering about this aswell.
#5

[eluser]Kamarg[/eluser]
Perhaps by using the built in Pagination class like the user guide suggests?
#6

[eluser]w0bbes[/eluser]
[quote author="Kamarg" date="1257909991"]Perhaps by using the built in Pagination class like the user guide suggests?[/quote]

Read first, then respond please.
#7

[eluser]eoinmcg[/eluser]
I'm sure there are a more than a few ways to so this but one method I use is to extend the Router class.

You can find a fully working example here:
http://ellislab.com/forums/viewthread/107451/#541043




Theme © iAndrew 2016 - Forum software by © MyBB