I have an issue with the biblio module (a most excellent module - thanks ron!)
I'm trying to limit my results of using this snippet;
<?php include_once drupal_get_path('module','biblio') . '/biblio.pages.inc'; print biblio_db_search("inline","year", 2008); ?>
I want to limit the result to just one item, with no pager - the "latest" publication and no others.
Is this possible? I've been looking through the pages.inc can see the search function but don't know how to manipulate it. Sorry if this is obvious - bit of a php newbie.
Comments
Comment #1
rjerome commentedNo apologies necessary, that is one of the most complicated bits of the code. As it stands you can't specify a specific limit, although it would not be impossible to add some code to capture a "limit" argument (this would be done in biblio_build_query() in the section that starts like this...
The "sort" case would be a good example, you could add a limit case like this...
and then use that value in biblio_db_search() near the end of the function like this...
Now I haven't actually tried this, so I can't guarantee the code is error free :-) but that's the jist of it.
Ron.
Comment #2
bathgate commentedWow, thanks Ron. I'll give that a crack.
Like I said, the module is a rippa.
Comment #3
liam morlandThis version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.