Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6209591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:00:47+00:00 2026-05-24T06:00:47+00:00

I am using the php framework codeigniter. I am attempting to create a here

  • 0

I am using the php framework codeigniter.

I am attempting to create a here is an example:

  • animals/feline/lion
  • animals/feline/tiger
  • animals/feline/snow-leopard
  • animals/canine/wolf
  • animals/canine/coyote

Where both genus (feline) and species (lion) are both retrieved from a database and animals is a controller. I have models that place genus and species in their respective arrays. I also wish to have views for each step along the breadcrumb as follows:

  • animals
  • animals/feline
  • animals/canine

Any help would be greatly appreciated. I just looked at autocrumb and all it was as for displaying the breadcrumb control structure on the view, and not what I want.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:00:48+00:00Added an answer on May 24, 2026 at 6:00 am

    I’d use URi routing., as another approach than __remap(), which is better, but I just wanted to give another choice

    $route['animals/(:any)/(:any)'] = "animals/method/$1/$2";
    

    In you animals controller you have

     function method($genus,$species)
     {
    
       $data['breadcrumb'] = 'animals -> '.$genus.' -> '.$species.
       $this->load->view('breadcrumb', $data);
       $this->load->view('animals/'.$genus.'/'.$species);
     }
    

    view breadcrumb.php:

    <div id="breadcrumb">
    <?php echo $breadcrumb;?>  <!-- Display: animals -> feline -> lion -->
    </div>
    

    View folder contains:

    breadcrumb.php
    animals /
              feline /
                       feline.php
              canine/  
                       wolf.php
    

    Is this what you were looking for?

    EDIT after comments:

    SO looks like we’ve mistaken what you wanted. If you’re retrieving those variables from DB, then you could do like this:

    function index()
    {
      $this->load->view('animals/index');
    }
    
    function genus($genus)
    {
      $data['genus_data'] = $this->your_model->load_genus_data($genus);
      $this->load->view('animals/genus',$data);
    }
    function species($genus,$species)
    {
     $data['genus_data'] = $this->your_model->load_genus_data($genus);
     $data['species_data'] = $this->your_model->load_species_data($species);
     $this->load->view('animal/genusspecies',$data);
    }
    

    In your view genus.php (in folder animal):

    <?php $genus_data->name;?> is an animal that...Here's a pic in its habitat.
    

    In your view genusspecies.php (in folder animal):

    <?php $species_data->name;?> is a species of genus <?php $genus_data->name;?>....
    

    all those might be html snippets you load from database;

    Your routing might look like this then:

    $route['animal'] = "animal";
    $route['animal/(:any)'] = "animal/genus/$1";
    $route['animal/(:any)/(:any)'] = "animal/species/$1/$2";
    

    If I were you, I’ll go about this way. Do I got it better or am I still wrong somewhere?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code here in PHP using Codeigniter framework, I can't seem to
I am thinking of using a PHP framework called CodeIgniter . One of the
I'm using CodeIgniter (a PHP framework) to build an app, and I have an
I am using codeigniter framework. where should i sanitize PHP input - controller or
I'm trying to create a Zend Framework project using PHP 5.3.2 and Zend Framework
I am on a project using php and codeigniter framework. I want to make
My question(s) is one of best practices for OOP. Im using Codeigniter framework/PHP. I
I have been using the encryption class of codeigniter (PHP framework) for a while
I am using codeigniter php framework. I am suffering from the problem that all
I am using Codeigniter PHP Framework with Tank Auth authentication library. In my config

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.