Welcome to TalkGraphics.com
Results 1 to 10 of 33

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    300

    Default Re: Temporarily hiding mobile variant

    Quote Originally Posted by gwpriester View Post
    Good question. I am not sure.

    Do you want to have the mobile site up at the same time? This gets very messy. You can stop sharing the mobile variant (you will have to do this page by page) but then any changes you make to the main variant will have to be made manually to the mobile variant.
    I want to publish only the desktop site at this stage. The site will then need many many minor updates (structure and content) and I'd rather not have to republish everything if I just change a few words. The mobile variant will go live much later, but I would like to start experimenting with that now.

    A better alternative would be to have both versions on the live site, with just the mobile version in a password-protected directory. But this would necessitate a way to force all users to the desktop version, where they would see a message saying that the mobile version will be available soon. Not sure if this is possible?

  2. #2
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,522

    Default Re: Temporarily hiding mobile variant

    Probably best then to just publish a main site and not the mobile variant until it is ready.

    You could create a mobile variant but do not link to any of the pages and just have a small announcement on the mobile home page, site under construction or something to that effect?

  3. #3
    Join Date
    May 2009
    Posts
    300

    Default Re: Temporarily hiding mobile variant

    Quote Originally Posted by gwpriester View Post
    Probably best then to just publish a main site and not the mobile variant until it is ready.

    You could create a mobile variant but do not link to any of the pages and just have a small announcement on the mobile home page, site under construction or something to that effect?
    Thanks but if I understand correctly this would mean that everyone with a small device would get directed only to the unready mobile version (graphics popping out of text panes and more all over the place etc) and would not see or be able to navigate the desktop version.

    Yes, it's possible to forget the mobile version until afterwards, but I really want to be experimenting with it as I develop the main version.

    So I think I will probably do as you suggested earlier - use two sites, publish only from the second and delete the mobile version from the second site just before each publish, and it won't be the end of the world if I'm republishing the whole site each time. Just thought there might have been a simpler way.

  4. #4
    Join Date
    May 2002
    Location
    Canada
    Posts
    3,345

    Default Re: Temporarily hiding mobile variant

    You can paste this to your home page when ready.

    <script type="text/javascript">
    <!--
    if (screen.width <= 480) {
    document.location = "http://domainname.com/mobilename";
    }
    //-->
    </script>

    You can change the 480 px to 600 or 800 depending on your needs.

  5. #5
    Join Date
    May 2009
    Posts
    300

    Default Re: Temporarily hiding mobile variant

    Quote Originally Posted by behzad View Post
    You can paste this to your home page when ready.

    <script type="text/javascript">
    <!--
    if (screen.width <= 480) {
    document.location = "http://domainname.com/mobilename";
    }
    //-->
    </script>

    You can change the 480 px to 600 or 800 depending on your needs.
    Don't think my original reply to this went through.. Thanks for the suggestion. But surely when I'm ready to publish both variants (deleting the mobile version before each publish in the meantime), the Xara coding would automatically redirect mobile users to the correct version. Or am I missing something?

  6. #6
    Join Date
    May 2002
    Location
    Canada
    Posts
    3,345

    Default Re: Temporarily hiding mobile variant

    If you delete the mobile version then there is no reason why the main site should direct it to your custom mobile version, unless you put the above code into the index page of your main site. If anyone else thinks I am wrong, please let us know.

  7. #7
    Join Date
    May 2009
    Posts
    300

    Default Re: Temporarily hiding mobile variant

    Quote Originally Posted by behzad View Post
    If you delete the mobile version then there is no reason why the main site should direct it to your custom mobile version, unless you put the above code into the index page of your main site. If anyone else thinks I am wrong, please let us know.
    Perhaps my query wasn't clear. I need to hide the mobile version only while developing it. So I'm currently doing, as Gary recommended:
    Save your site. Then save your site with a new name, for example Desktop only. Delete the Mobile Variant and publish.

    When the mobile version is ready to publish I will publish the complete version (desktop and mobile). So if I understand correctly, there should never be a need for extra code.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •