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 666751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:51:11+00:00 2026-05-13T23:51:11+00:00

Ive recently started using CodeIgniter as I was searching for a very lightweight framework

  • 0

Ive recently started using CodeIgniter as I was searching for a very lightweight framework and it seemed to come up as a top choice.

I am new to the whole MVC thing, enjoying it but am stuck with something which seems very simple.

I am coding a CMS and need a way to filter, sort and paginate the results. I am used to doing it with querystrings, so I would have something along the lines of:

articles.php?order=title&sort=desc&filter=articletitle&page=5

I have no idea how I would go about doing this in CI so I just turned on the EnableQueryStrings in the config and it works fine, but i am getting the feeling its probably not the most elegant solution.

I suppose I could have

index.php/articles/index/order/title/sort/desc/filter/articletitle/page/5

but to me this seems very inflexible, what if for example i dont need to sort, how would i make sure i am looking at the correct uri segment?

any ideas?

  • 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-13T23:51:11+00:00Added an answer on May 13, 2026 at 11:51 pm

    Have you tried implementing the _remap function? It will redirect all queries to the controller to that function allowing you to implement as many (or as few) of those as you like.

    You could then do something like this:

    class Articles extends Controller
    {
        // Note: No need for a "order" or even an "index" function!
        public function _remap()
        {
            $assoc = $this->uri->uri_to_assoc( 4 );
            /* $assoc is now 
               array( "order"=>"title",
                      "sort"=>"desc",
                      "filter"=>"articletitle", 
                      "page"=>5); */
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently started using Zend Framework and I'm still pretty used to session_start, and
I've recently started using GNU Screen but have run into a very annoying problem.
I've recently started using Entity Framework migrations and noticed that the database name is
Ive recently started using Ruby on Rails for a project of mine and have
I've recently started using Zend Framework (1.8.4), to provide admin tools for viewing the
I've just recently started using VS2008 for a new tools project, and have been
I just recently started using MeioUpload 2.0 with cakephp 1.3. Ive configured the behaviour
I've recently started using new C++11 features like lambda expressions to make my code
I've recently started using tinyXML. The problem is when I run my program to
I've recently started using an IoC container for the first time, but I'm not

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.