Mick23 Posted June 21, 2023 Posted June 21, 2023 Is it possible to get the current forum view method (table, fluid etc.) in code? I notice that the URL to set the method contains these parameters so was hopeful they could be easily retrieved somehow in JS: do=setMethod&method=fluid
Nathan Explosion Posted June 21, 2023 Posted June 21, 2023 Grab a cookie... var view = ips.utils.cookie.get('ips4_forum_view'); Mick23 1
Solution Daniel F Posted June 21, 2023 Solution Posted June 21, 2023 It's also stored in the database, so using the method is probably better \IPS\forums\Forum::getMemberListView() Mick23, ArashDev and SeNioR- 3
Nathan Explosion Posted June 21, 2023 Posted June 21, 2023 (edited) 1 hour ago, Mick23 said: somehow in JS: But using Daniel's suggestion you could get the value using that code, add it as a data attribute to something in a template and then grab that using JS code up front. A few more lines of code though. Edited June 21, 2023 by Nathan Explosion Mick23 1
Recommended Posts