1

How do i set the starting position of the pager using EntityFieldQuery pager. Here is my current code.

$query = new EntityFieldQuery();
$query
    ->entityCondition('entity_type', 'node', '=')
    ->propertyCondition('status', 1, '=')
    ->propertyCondition('type', 'event')
    ->pager(1);

return  $query->execute();

Reading the docs. enter link description here I can't see how to set the starting point of the pager.

Further info. I'm using this query to create a custom cvs dump. So it won't appear as normal html grid.

Also. I have a lot of nodes. So i need to ensure the start and limit are in the sql query and not filtered using php

edit

It turns out i was using the wrong property. Instead of pager use range.

http://treehouseagency.com/blog/tim-cosgrove/2012/02/16/entityfieldquery-let-drupal-do-heavy-lifting-pt-1

  • 1
    I'm glad that you found out the solution yourself, however don't forget to answer your question. That will help others :) – Mathankumar Oct 19 '12 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.