Raise page limit up to 2000 news article

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
pWorker
Forum Members
Forum Members
Posts: 48
Joined: Wed Aug 31, 2016 1:30 pm

Raise page limit up to 2000 news article

Post 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?

MfG
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Raise page limit up to 2000 news article

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
pWorker
Forum Members
Forum Members
Posts: 48
Joined: Wed Aug 31, 2016 1:30 pm

Re: Raise page limit up to 2000 news article

Post 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 ) {
   evt.preventDefault();   
var goTo = $(this).find("a").attr("href");
alert(goTo);
 var tmp = goTo;
 var tmp2 = tmp.replace(/amp;/g,'');


$.ajax({
    url: tmp2,  //Pass URL here 
    type: "GET", //Also use GET method
    success: function(data) {
$("#wrapper_one").empty(); 
        var sourcecode = $(data).find('#wrapper_one').html();
    $("#wrapper_one").html(sourcecode); 
    }
});
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 ;) ?
pWorker
Forum Members
Forum Members
Posts: 48
Joined: Wed Aug 31, 2016 1:30 pm

Re: Raise page limit up to 2000 news article

Post 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.
Locked

Return to “Modules/Add-Ons”