Advsearch PagingType=0 Provides No Output

I’m replacing a resource that uses a set date range to return fields from other resources with advsearch. The original resource has a tabbed UI populated via two getResources calls - the first call returns an li element for each resource returned by the call that creates tabbed pagination.

It looks like advsearch’s pagingtype0 might allow me to replicate this UI, inasmuch as it seems intended to provide a pagination output for each results page returned by a search.

By default, pagingtype0 uses the pagelink chunk provided with the package as the pagination link. However, setting &pagingType=0 returns no output. I see the paging wrapper, but not the pagelink chunk(s) within. Modifying the snippet call to use a pagelink chunk tpl of my specification doesn’t return anything, either.

This is the pagination (wrapper and links) chunk - the pagechunk tpl placeholder is [[+advsearch.paging]] - it is used by both pagingtypes 0 and 1:

<section class="journal-area journal-area_main journal-area_search-results-paging">
    <div class="advsea-paging[[+advsearch.pagingType]]">[[+advsearch.paging]]</div>
  [[+advsearch.results]]
</section>

Around line 481 of advsearchresults.class.php is a block for pagingTypes. I’m out of my depth with this, but I see nothing addressing pagingType=0. Perhaps I’m misunderstanding the intent behind this?

In any event, if anyone has ideas or pointers, I’m trying to produce a distinct pagination result for each page of results returned by a search.

The problem with AdvSearch (as far as I can tell) is, that when they released version 2 (almost 6 years ago) they never updated the documentation. So a lot that is written there isn’t correct anymore.

And judging from the code (as you already noticed) the pagingType=0 doesn’t seem to exist anymore. (But there are now new types 2 and 3 that are not documented.)

That indeed is the problem. After seeing the additional paging types:

Type 2 is what type 0 was originally documented as - it returns distinct pagination for each results page (i.e. 1 | 2| 3 | 4 )

Type 3 combines 1 and 3: Previous | 1 | 2 | … | 4 Next

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.