[TYPO3-ttnews] offset param by GET for AJAX page
Stefano Cecere
scecere at krur.com
Mon Oct 24 22:05:12 CEST 2011
for now the easiest way i managed to do it (pass an offset parameter via
GET var) was modifying
function createDemandObjectFromSettings($settings) of
/Classes/Controller/NewsController.php
from
$demand->setOffset($settings['offset']);
to
if (intval(t3lib_div::_GP('offset')) > 0) {
$demand->setOffset(intval(t3lib_div::_GP('offset')));
} else {
$demand->setOffset($settings['offset']);
}
Georg: do you think it coudl be itneresting make it more "universal" and
prepare a patch for it?
ciao
stefano
On Mon, 24 Oct 2011 17:08:50 +0200, Stefano Cecere <scecere at krur.com>
wrote:
> hi
>
> i'm setting up an ajax page to get requested news
>
> i just would like to pas the offset parameter ( settings.offset ) by a
> GET variable
>
> i coudl make this work:
>
> ajax = PAGE
> ajax.typeNum = 999
> ajax.10 = USER_INT
> ajax.10 {
> userFunc = tx_extbase_core_bootstrap->run
> extensionName = News
> pluginName = Pi1
> controller = News
> action = list
> settings =< plugin.tx_news
> settings {
> limit = 4
> offset = 3
> # offset.dataWrap = GPvar : from
> }
> }
>
> but i can't make it work with
> offset.dataWrap = GPvar : from
>
> i guess because the offset parameter isn't passed through a stdWrap in
> the ext code.
> right?
>
> what do you suggest me: to make a patch for the code, or to try and use
> paginator parameters?
>
>
>
>
--
____ ___ __ _ ______________________
Stefano Cecere
Krur multimedia studio
More information about the TYPO3-project-tt-news
mailing list