Mick23 Posted June 21, 2023 Share 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 Link to comment Share on other sites More sharing options...
Nathan Explosion Posted June 21, 2023 Share Posted June 21, 2023 Grab a cookie... var view = ips.utils.cookie.get('ips4_forum_view'); Mick23 1 Link to comment Share on other sites More sharing options...
Solution Daniel F Posted June 21, 2023 Solution Share Posted June 21, 2023 It's also stored in the database, so using the method is probably better \IPS\forums\Forum::getMemberListView() Mick23, SeNioR- and ArashDev 3 Link to comment Share on other sites More sharing options...
Nathan Explosion Posted June 21, 2023 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts