I can not understand how to display the contents.
For example, there is a controller:
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class News extends CI_Controller { public function __construct() { parent::__construct(); } public function index() { // код } public function view($slug = NULL) { // код } public function photo() { // код } }
When calling:
site / news - all news opens
site / news / view / 2 - opens 1 news with id 2
How to add a final photo link to one news page to open a page with photos of this news, for example:
site / news / view / 2 - opens 1 news with id 2
site / news / view / 2 / photo - a page of photos to news with id 2 opens
I can not understand how to implement. If you specify the photo function in the controller, it opens as the site / news / photo.
Is there any way to make an option from the site / news / view / 2 / photo?