Would it make sense to add a setting that only excludes categories from the homepage on desktop clients? Or would this be something that should be handled in a plugin?
Some context: I am building a Discourse site with an un-Discourse-like layout for the topic lists. My layout has a sidebar that lists the latest posts from several categories that are excluded from the homepage. Since the sidebar is only for desktop, topics from the sidebar categories are excluded from mobile as well, and I would like to show them in mobile.
I would be happy to do this within my plugin, if it is doable. I am a newbie in Ruby, but I did find where the filtering of excluded categories is done and I tested quickly adding a check for mobile_view there, and it works. I just added the
unless statement below:
if filter.to_s == current_homepage unless view_context.mobile_view? list_opts[:exclude_category_ids] = get_excluded_category_ids(list_opts[:category]) end end
But, help, I don’t know how to do this from within the plugin.