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

  • Home
  • SEARCH
  • 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 8872487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:14:00+00:00 2026-06-14T18:14:00+00:00

OK so basically I have created a simple page using Kohana for displaying a

  • 0

OK so basically I have created a simple page using Kohana for displaying a user’s message inbox/outbox using tabs.

My controller is something like this:

$content                 = View::factory('messages')->bind('user', $user)->bind('received', $received)->bind('sent', $sent)->bind('pager_links', $pager_links);
$user                    = Auth::instance()->get_user();
$message_count           = ORM::factory('message')->where('to_id', '=', $user)->where('read', '=', '0')->count_all();
$pagination              = Pagination::factory(array(
    'total_items' => $message_count,
    'items_per_page' => 10
));
$received                = ORM::factory('messages')->where('messages.to_id', '=', $user)->limit($pagination->items_per_page)->offset($pagination->offset)->find_all();
$sent                    = ORM::factory('messages')->where('messages.user_id', '=', $user)->limit($pagination->items_per_page)->offset($pagination->offset)->find_all();
$pager_links             = $pagination->render();
$this->template->content = $content; 

So far I am only displaying the received messages and pagination in the view and it is working fine. However I want to implement a tab container to display both the received and sent items on the same page.

I am scratching my head wondering how to use the pagination aspect for each tab without it affecting both tabs. What would be the best direction for this using the existing approach? Perhaps throwing an additional parameter into the URL when a tab is selected…

Thanks

  • 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-06-14T18:14:02+00:00Added an answer on June 14, 2026 at 6:14 pm

    Basically your issue is that you can’t use page in the query string for both of the tabs at once, as obviously it will affect both pagination functions. Luckily there is in fact a configuration open that allows you to specify the source of the current page parameter in the query string.

    Try this…

    $pagination              = Pagination::factory(array(
        'current_page' => array('source' => 'query_string', 'key' => 'tab1_page'),
        'total_items' => $message_count,
        'items_per_page' => 10
    ));
    

    Then all you need to do is make sure that your pagination view is passing the page number to the correct parameter in the query string e.g. http://mydomain.com/pagewithtabs?tab1_page=2&tab2_page=3 will put tab 1 on page 2 and tab 2 on page 3.

    Hope that helps!

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

Sidebar

Related Questions

I have created following thing in android using android compatibility support package Basically i
Basically, I am using Wireshark looking at captures that have been created previously. How
I have a page which basically allows an admin user to create manager user
Basically, I have created a custom control that uses an UpdatePanel, and as I
Basically, I have a model where I've created a superclass that many other classes
I have a query that is more complicated, but basically creates an HTML page
I have created an Ajax enabled WCF web service that contains this simple method:
I am opening a YouTube web page using the 'webbrowser' module: controller = webbrowser.get()
I have a web application which basically process entries of the user when the
So basically, I'm a bit new to Python. I created a server and have

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.