Different landing page for desktop vs mobile theme?


(smartwatchme) #1

Is it possible to somehow set a different landing page based on desktop vs mobile? i.e when you’re on mobile you land on /categories while desktop would land on /latest.


How to default to latest on mobile and categories+latest on desktop?
Show Latest Posts on mobile view
Set the top menu in the mobile view independently of the desktop view
Display categories on Desktop and Latest Post on mobile
Different between mobile display and website display
(Jesse Perry) #2

Just about to start a new topic on this — and saw this was discussed (although it probably should be categorized as "Feature).

I would second this — but with a slightly different use case. The new categories view (in current Discourse betas and here on Meta) would be perfect to display by default on desktops. But the new Categories layout I like doesn’t display on mobile, so I would still want Latest to be default on mobile.

Would love to know if the team thinks this would be a helpful feature. Great work on the new Categories layout!


#3

I would love this also, latest makes sense on mobile. A setting for this or some advice on how to make this happen would be great.


(Lutz Biermann) #4

See here for an ugly but working way to do it:
How to default to latest on mobile and categories+latest on desktop?

And here:
Set the top menu in the mobile view independently of the desktop view (with the admin setting “top menu” you also set the landing page.)


#5

Thanks @Lutz I’ll check those posts out.


#7

If there are technical reasons giving user’s the option to choose what the default mobile home page is independent of desktop is hard, is it possible/easier for mobile to always default to x when desktop is in category + x mode?

I think this would be preferential to more users over defaulting to category mode.


(Joe Z) #8

I’d just like to bump this. I think it is important to have the ability to change the views depending on mobile or desktop.


(René Hagspiel) #9

Also for me, I waiting for this.


#10

Same, we use Category and latest for “Desktop” view but mobile users whose use case is “8 minutes whilst in the back of a cab” want “Latest” view.

“Latest” view with our posts set as overarching default encourages short shotgun comments to keep “bumping” threads up and less busy but not less important threads are just vanished immediately in the scrum.

The category view on mobile or lack of “latest” setting as a default option is hurting the usability of the site for us.


#11

Given that there is already distinction made in Theming between Desktop & Mobile, this would seem a completely reasonable request?


#12

Hopefully so, at 1000 members we’re at that funny point now where latest view is turning into a freeway for the 120 core users which newbies will struggle to engage with and at the same time we have “senior” members of the community who didn’t realize that certain categories even existed. (Hence we now moved to category, latest).

Doing a better job of communicating to your own people what it is that you’re doing is of course our own job bbbbbuuuuut - and I hate it when people say this to us- surely this functionality isn’t that hard to implement?


(Joshua Rosenfeld) #13

I use the following script on a site I run:

<!DOCTYPE html>
<!-- Make logo link to /latest -->
<script type="text/discourse-plugin" version="0.4">
  api.changeWidgetSetting('home-logo', 'href', '/latest')
</script>

It makes clicking the logo go to the latest page instead of categories. I find it’s a decent workaround as it’s how users tend to navigate (click the logo to go home). Thus other than the initial load users end up on latest not categories. Add it to your theme in Mobile </head>


#14

Thanks holmes appreciated.


(David Kingham) #15

I would love to see this as well.


(Jay Van der Zant) #16

Another vote here. I feel quite strongly that the Category view works best for desktop and Latest best for mobile. Please Discourse team, could we have this?


(Dave) #17

And for my sites too please - We’ve reached a point in the number of users that new members are posting in the wrong place because the categories aren’t that obvious in Latest view.

The Categories view just doesn’t “work” on mobile!

So could we please have the option of having different views depending on device type.

Thanks guys, I so love this software!

Cheers


(Vincent) #18

Still bumping this feature request. Comparison shots between Categories and Latest, on mobile:

Quite the “extreme” use case since our forum is about sharing music and we use Topic List Previews, plus my screen is amongst the smallest (iPhone SE).


#19

@Amethi, @maia_internet, @_vincent, et al. Here’s a very simple theme component that should get you by. It may not be as ideal as a built-in feature added to core, but it should accomplish what most of you are asking for.

I hoped to have a way to honor a user’s choice when it comes to mobile if it was explicitly set. It’s possible I may be able to handle that to some extent once user-side theme settings come out, but for now you will be forcing the homepage to be “latest” (or whatever you change it to) for all of your users while they are browsing mobile. Desktop will still honor your default site setting or what your users pick as their homepage.

I’ll make a proper post in #theme a little later. I’ve run out of time for now. Hope this helps!


(Jay Van der Zant) #20

Seems to work really well @tshenry. Thanks!


(Dave) #21

I might be going daft here, but how do I include your theme component into my existing theme?

Cheers