Gravatar for goetzathome@gmail.com

Question by Matt, May 27, 2015 8:41 AM

How do I disable the mobile interface?

As part of a UX redesign, we are working to eliminate all differences in UI across devices. Changes in the skins have only gotten us so far. I'm looking for a way to tell the FE tools "Never use the mobile interface".

The mobile interface seems to trigger based on the user agent, but I have been unable to change that in a way that is picked up by the Coveo.CNL.Web.Browser object.

Is there a way to disable the mobile interface globaly? Per interface?

2 Replies
Gravatar for goetzathome@gmail.com

Answer by Matt, May 27, 2015 10:29 AM

I've received the following update from support on this issue:

Here is what you need to do to make it work:

  1. Make sure that you Coveo .Net Front End 12 Build # is 856 ( July 2014 ) or later

  2. Add the code below at the end of the following file with a text editor:

    File: C:\Program Files\Coveo .NET Front-End 12\Web\default.aspx
    
    <script runat="server"> 
        protected override void OnPreInit(EventArgs e)
        {
            Coveo.CNL.Web.Browser.ForceMobile = false;
            base.OnPreInit(e);
        }
    </script>
    
Gravatar for slangevin@coveo.com

Comment by Simon, Jul 7, 2015 5:00 PM

I converted your comment as an answer for future use.

Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, May 27, 2015 9:18 AM

Each search hub contains a list of standard, mobile and outlook interfaces. When landing on a standard search interface and detecting a mobile user agent, the search hub will check if the equivalent mobile search interface is included in the search hub and choose it for the UI if present.

Deleting all the mobile interfaces from your search hub should prevent it to switch to a mobile search interface.

Gravatar for goetzathome@gmail.com

Comment by Matt, May 27, 2015 9:35 AM

That seems to have done the trick! I must admit I'm a little bummed there isn't a less drastic measure, but so be it. Thanks!

Update: Further is now returning the 'No Search interface is defined' error, back tothe drawing board…

Ask a question