You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
could device_view functionality be optionally session based? #5
Current problem is that when user visit the sit with mobile and he decides to check full page version he is stuck with full page version unless he manually switches back.
I think that it would be logical to always redirect new mobile sessions to mobile page.
You offer good ideas, but the next month I will have very little time. You can do PR's or I can add you to the list of collaborators. Together productively!
If you are interested?
I think we'd need a way to get back to the mobile view (or in other words: to the default device behaviour), regardless of cookie lifetime or whether the view overwriting is attached to the session.
I found another workaround that seems to work: I included the following at the very bottom of my "desktop" template:
{% if is_mobile() %}
<a href="?device_view=mobile">
To mobile version »
</a>
{% endif %}
Thanks to the is_mobile() check, this will only ever be displayed if a mobile device displays the full version (which only happens when the view is overridden).
Applying this trick in your mobile template could also be helpful to give accidental desktop visitors a chance of reaching the corresponding full desktop page (though #43 would be nice, too :)).
Activity
suncat2000 commentedon Sep 25, 2012
You offer good ideas, but the next month I will have very little time. You can do PR's or I can add you to the list of collaborators. Together productively!
If you are interested?
HenriVesala commentedon Sep 25, 2012
Yeah. I have bit similar situation ongoing but I shall make PR's in the future if I have time.
You can also add me to collaborator if you like.
HenriVesala commentedon Oct 9, 2012
This feature wasn't included in my PR and is still in todo list.
suncat2000 commentedon Oct 9, 2012
Ok
I hastened )
gnikyt commentedon Mar 22, 2013
Is this going to be added? This is an issue I had as well where the cookie kept the user on the full version and they'd have to manually switch back.
My work around for now is:
In the controller, might not be the best way but session based would definately be good!
HenriVesala commentedon Apr 11, 2013
Currently I don't have any need for this feature so I think nobody is working on it.
Feel free to make pullrequest if you have solution.
tobias-r commentedon Jan 24, 2014
I also need this feature. Can't you guys just solve it with Cookie Lifetime?
Now we have 30 days, just change it to expire=0 and we're all set?
netmikey commentedon Jun 28, 2014
I think we'd need a way to get back to the mobile view (or in other words: to the default device behaviour), regardless of cookie lifetime or whether the view overwriting is attached to the session.
I found another workaround that seems to work: I included the following at the very bottom of my "desktop" template:
Thanks to the is_mobile() check, this will only ever be displayed if a mobile device displays the full version (which only happens when the view is overridden).
Applying this trick in your mobile template could also be helpful to give accidental desktop visitors a chance of reaching the corresponding full desktop page (though #43 would be nice, too :)).
Symfony 4.2 and 5.0 support