How to perform a join using the paginate method? (1 post)

  1. kevcpu
    Posted 3 years ago #

    I am using WP MVC for wordpress and am having the following issue. Here is an example scenario. I would like to allow a user searching capabilities on the event index.php page. For example, I would like them to be able to find all events by venue or speaker and have dropdowns for venue and speaker. How is this possible using the paginate function in the events_controller.php?

    Here is the current code:

    public function index() {
    		$this->params['page'] = empty($this->params['page']) ? 1 : $this->params['page'];
    		$this->params['conditions'] = array('is_public' => true);
    		$collection = $this->model->paginate($this->params);
    		$this->set('objects', $collection['objects']);

    How do you tell paginate that you would to join or better yet where and how do you join in this case?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP MVC
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.