Timeline for Use ajax to render a view - pagination not working
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 16, 2018 at 14:33 | comment | added | Krishna Mohan | Excellent!. You saved me :) I tried so many ways to get it work. Finally it's done | |
Sep 20, 2017 at 18:06 | comment | added | jhoffmcd | Sweet! That's even easier! | |
Sep 19, 2017 at 7:09 | comment | added | Chris | I figured it out myself in the end, just need to add it to the front of the ajax call, only if it's not the default language like: url: '/' + lang + '/views/ajax', | |
Sep 19, 2017 at 4:55 | comment | added | jhoffmcd |
I have never done localization in Drupal, but I would assume that there was a locale param to pass to the view, much like a contextual filter. I notice there is also a Drupal.locale key in the Drupal object, but I'm not sure what it's used for since I never have to add i18n modules.
|
|
Sep 18, 2017 at 10:31 | comment | added | Chris | I have a bonus question for you, as you've been so helpful! Any idea how to pass the language into the ajax call? At the moment it's returning the default language. | |
Sep 5, 2017 at 16:36 | comment | added | jhoffmcd | Haha that was the first thing I was going to ask. Glad it's working out for you. | |
Sep 5, 2017 at 2:07 | comment | added | Chris | Actually forget that, it works! I had disabled ajax in the view :) | |
Sep 5, 2017 at 2:00 | comment | added | Chris | Actually I'm just trying this now, and it's not working for me. response[0].settings.views returns undefined and if I try Drupal.settings = response[0].settings I just get the same response as it my original question. Any ideas? | |
Sep 1, 2017 at 10:40 | vote | accept | Chris | ||
Aug 31, 2017 at 16:12 | comment | added | jhoffmcd |
Even better, you could probably just do Drupal.settings = response[0].settings;
|
|
Aug 30, 2017 at 6:43 | comment | added | Chris | Looks good, thanks for the response! I could never get it to work this way so I built it a different way. | |
Aug 29, 2017 at 6:40 | history | answered | jhoffmcd | CC BY-SA 3.0 |