Page 1 of 1

Raise page limit up to 2000 news article

Posted: Tue May 02, 2017 7:16 am
by pWorker
Hi all,

i have a big problem. I`m calling a news module summary view template in a cguserDirectory Detail view template.

Now the problem is, that there are only 1000 loops done by the forach loop and so the older articles are not shown (ca. 3.000 articles spread up to 9 categories). The template filters the output by a custom field value.

When I use the pagenumber and navigation onboard, i can`t access the second site (nor third, fourth etc.) of the summary view, cause it is allways redirecting me to the returnid page without having the content of the cguserDirectory detail view template i was calling the news module from.

I thought I could simply ajax the nexturl and fetch the contents (div class .feudetailloesungen), but it also traces the wrong page.

Another solution would be to generate only the elements with the news template, split them up

Code: Select all

{news module start=0 number=200}
{news module start=200 number=200}
{news module start=400 number=200}
{news module start=600 number=200}
{news module start=800 number=200}
and do the module calls lazily, but i cant`t find a tutorial to lazy load module calls from frontend.

A third possibility would be to use an alternative news.default.action.php where the maximum page limit for this specific call could be raised up to 2000.

Has anyone an idea of how to load such a huge ammount of data step for step or as an ajax load?


Re: Raise page limit up to 2000 news article

Posted: Tue May 02, 2017 2:00 pm
by Rolf

Re: Raise page limit up to 2000 news article

Posted: Wed May 03, 2017 11:24 am
by pWorker
Hey Rolf,

thanks for your answer. My news are filtered through the foreach loop so that the news articles i have to load should also loop through the template foreachloop-filtering.

This code loads simply the 2nd page of the news. But I would need the results filtered through my news template as well.

Code: Select all

$(document).on('click', '.notthepage', function ( evt ) {
var goTo = $(this).find("a").attr("href");
 var tmp = goTo;
 var tmp2 = tmp.replace(/amp;/g,'');

    url: tmp2,  //Pass URL here 
    type: "GET", //Also use GET method
    success: function(data) {
        var sourcecode = $(data).find('#wrapper_one').html();
On the other hand i was asking myself wether it would make sense if i put a second {News with my parameter call} on another page, change the start element to e.g. 1000 and load then the results, each 3 divs in 1<li>-type element, to the already existing <ul>.

This way i only have to load the filtered results to the list, but i dont know if it`s possible to execute such call at another page without having the template variables which are needed for the filtering and which are located only at the original page .The original page is a CgUserDirectory Detail Template.. Do you understand what I mean ;) ?

Re: Raise page limit up to 2000 news article

Posted: Sat May 06, 2017 10:26 am
by pWorker
Well, my final ssolution is now to ajax the slides from a separate module action url on a separate page. The important hint was found here: viewtopic.php?f=7&t=73344

With help of the session put variable i can now call the template structure for the specific user with an ajax function and get the other news articles.