[TYPO3-project-4-3] indexed_search for 4.3
Steffen Kamper
info at sk-typo3.de
Mon Sep 15 11:27:18 CEST 2008
Hi,
Dmitry Dulepov [typo3] schrieb:
> Hi!
>
> Ralf Hettinger wrote:
>> * enable result navigation (pagebrowser) that doesn't rely on
>> JavaScript only (e.g. by using [3])
>
this is independent from used pagebrowser as these links are compiled in
an extra function of IS, the pagebrowser used is the one from pibase.
> I made a dedicated page browser extension as a part of my work in
> Netcreators. It is specially developed for use from other extensions.
> Comments extension will soon migrate to use this new page browser. The
> extension is not public yet.
>
> You can see something close in functionality here:
> http://scan.vara.nl/pg.9-8.archief.htm It is *not* my extension there
> but I got inspiration from this web site. There are first [on/off],
> previous [on/off], dots-previous [on/off], page list [configurable
> number of before/after], dots-next [on/off], next [on/off], last links
> [on/off].
>
> I think more and more to propose the page browser as a new sysext when
> the extension becomes public. This way we will have common feature reach
> pagebrowser that can be used by the indexed search too.
>
> Here is a code from one real extension that creates the page browser:
>
> protected function getListGetPageBrowser($numOfPages) {
> // Get default configuration
> $conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_pagebrowse_pi1.'];
> // Modify this configuration
> $conf += array(
> 'pageParamName' => $this->prefixId . '|page',
> 'numPages' => intval($numOfPages/$this->conf['pageSize']) +
> (($numOfPages % $this->conf['pageSize']) == 0 ? 0 : 1),
> );
> // Get page browser
> $cObj = t3lib_div::makeInstance('tslib_cObj');
> /* @var $cObj tslib_cObj */
> $cObj->start(array(), '');
> return $cObj->cObjGetSingle('USER', $conf);
> }
>
> As you see from the example, it is really simple. The page browser even
> uses $this->extPrefix to create a configurable piVar for the current
> extension. Seven lines of code (without comments) and you have s fully
> styleable and templateable page browser!
>
> The page browser is also clever enough to make cHashes. It will skip
> page parameter for the first page and avoid extra page cache entry,
> which is extra optimization. The only missing thing to the moment is the
> manual and public status of the extension.
>
great!
As the pibase pagebrowser is conceptional for usage from extensions, is
there a possibility to enhance that one or exchange with yours?
vg Steffen
More information about the TYPO3-project-4-3
mailing list