I did this sucessfully in Drupal 4.5. Here are the changes that would ned to be made in Drupal cvs to do the same:

Change line 955 from:

function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $pager = TRUE) {

to:

function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $pager = TRUE, $pager_alt = 0) {

After line 837:

$result = pager_query($sql, variable_get('default_nodes_main', 10) , 0, $sql_count);

add:

    } elseif ($pager_alt != 0) {
      $result = pager_query($sql, $pager_alt , 0, $sql_count);

That will enable you to call the function from a page using PHP as follows, overriding the default pager setting for that call only:

$output = taxonomy_render_nodes(taxonomy_select_nodes($tids, "or", "all", FALSE, 3));

You can see an example of this modification in action here, with the function called twice using two different terms:

http://www.devalpatrick.com/home

That page is just a demo right now, but it will be used to create a landing page from the curent splash page which will display the three most recent media items and the three most recent press releases along with a short introductory text.

Comments

ricabrantes’s picture

Version: x.y.z » 7.x-dev
Status: Active » Closed (fixed)

bump

ricabrantes’s picture

Status: Closed (fixed) » Active
catch’s picture

Status: Active » Closed (duplicate)