This patch includes code to implement paging functionality when listing glossary terms. Particularly useful when people need a glossary on a site with limited height.
The paging is enabled in 'Administer->Site Configuration->Glossary Settings' by checking the 'Paging' checkbox and filling out the 'Pagesize' textfield, which defaults to 10.
The core paging is used for the actual paging functionality. The terms are retrieved by the glossary_get_tree function instead of the taxonomy_get_tree function. This is to prevent retrieval of all terms when the only the terms starting with x are needed for the pager. The alphabet bar is still built based on taxonomy_get_tree.

Comments

nancydru’s picture

Wow, thanks. I'll look at this today.

nancydru’s picture

Amazing! Other than the taxonomy module, this is the first use of hook_get_tree that I have seen. (And, BTW, I'm the one that put hook_get_tree into the API docs.)

nancydru’s picture

Status: Needs review » Needs work

Are you sure this is a 6.x-1.3 patch?

-  $current_let = '';
+  $first_let = '';

This is backing out a change that just went in.

sylvaingirard’s picture

Status: Needs work » Needs review

I modified this module yesterday and when I wanted to create a patch today, I noticed the 1.3 was released. So originally, this was for 1.2 and I might have missed that change... Sorry about that.

sylvaingirard’s picture

Status: Needs review » Needs work

Oops, unintended status change :/

sylvaingirard’s picture

Okay, seems I missed more then just that one, will fix it asap.

sylvaingirard’s picture

Status: Needs work » Needs review
StatusFileSize
new5.56 KB

Reworked patch attached...

getstarted’s picture

I am not able to patch this for the latest version. any updates to this?

nancydru’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)