Just started learning codigniter and as far I learned from tutorials and by reading documentation I got and idea a basic about how to develop websites using codigniter as far as we see by using MVC framework there are many advantages so my questions is let suppose if we start building up a listing website obviously it contains view category wise so if I add 10 categories from the database so it does not mean I have to create 10 .php files to be able to get the view like i create a page and in controller i call that view file like this
public function index() {
$this->load->view('listings');
}
Or something like we develop a page within the same controller so the structure will be developed like this
public function ads() {
$this->load->view('ads');
}
Here ads is ads.php and in the url it will show localhost/directoryname/listings/ads
so for category links i posted as <?php echo base_url()."listings/ads/".$query->cat_name; ?>
I am creating a list of ads so in order to to display ad details on a detail page would it be required to create pages for every ad details like I want my link to look like this localhost/directoryname/listings/ads/categoryname/add_name
or somethign like this which i noticed on many websites so for that can any one give me the concept is there a way to make this dynamic i now we can do it by get method but still in that method it will show like this localhost/directoryname/listings/ads?cat=categoryname&add_name=name