Results 1 to 5 of 5

Thread: Contao 3 and mobile layout

  1. #1
    User
    Join Date
    01-29-13.
    Posts
    64

    Default Contao 3 and mobile layout

    Hello to everybody,
    I've been reading around that with Contao 3 I can choose a customized layout for a mobile version of my website.
    Since I'm going to release a Contao 3 website I tried creating a new layout and looking for a "mobile" option, but couln't find any.

    So this is the question: can I really choose a customized layout for my mobile website? If so, how?

    Thank you in advance
    --
    Marco
    ---------
    Triste e' l'uomo
    che ama le cose
    solo quando si allontanano.
    (Baolian, libro dei pensieri Baol, I, vv. 1240-1242)

  2. #2
    User
    Join Date
    01-29-13.
    Posts
    64

    Default Re: Contao 3 and mobile layout

    Oooooooh, maybe I got it! In the page settings you can choose a "desktop" layout and a mobile one!

    I'll test it and then update this thread!
    --
    Marco
    ---------
    Triste e' l'uomo
    che ama le cose
    solo quando si allontanano.
    (Baolian, libro dei pensieri Baol, I, vv. 1240-1242)

  3. #3
    New user asidorov72's Avatar
    Join Date
    06-19-14.
    Location
    Sofia, Bulgaria
    Posts
    4

    Default Mobile looks as desktop

    Hello.
    I am new in Contao CMS. My problem is my contao website (mobile version) looks like a desktop version in Android 2.3.5 web browser and FF mobile browser
    http://www.zaehne-mit-zukunft-in-mainz.de/

    In Opera mini or Safari mobile it looks ok.
    Please help me.
    thank you

  4. #4
    New user asidorov72's Avatar
    Join Date
    06-19-14.
    Location
    Sofia, Bulgaria
    Posts
    4

    Default

    Quote Originally Posted by asidorov72 View Post
    Hello.
    I am new in Contao CMS. My problem is my contao website (mobile version) looks like a desktop version in Android 2.3.5 web browser and FF mobile browser
    http://www.zaehne-mit-zukunft-in-mainz.de/

    In Opera mini or Safari mobile it looks ok.
    Please help me.
    thank you
    Hello, again my Friends.
    I found the reason why my website was open in my mobile phone browser as a desktop.
    The reason was a default included mootools javascript files under the all html code. Downstairs.
    I just commented it:


    Code:
    <?php if ($this->footer): ?>
      	<footer id="footer">
          <div class="inside">
            <?php echo $this->footer; ?> 
          </div>
      	</footer>
      <?php endif; ?>
    </div>
      <?php //echo $this->mootools; ?>
    <?php if (!$this->disableCron): ?>
    <script src="<?php echo TL_ASSETS_URL; ?>assets/contao/js/scheduler.js?t=<?php echo $this->cronTimeout; ?>" id="cron"></script>
    <?php endif; ?>
    
    </body>
    I think It can be useful for other new contao people
    Thank you and have a good day!

  5. #5
    Community-Moderator xchs's Avatar
    Join Date
    06-20-09.
    Posts
    1,287

    Default

    Hi,

    Quote Originally Posted by asidorov72 View Post
    I found the reason why my website was open in my mobile phone browser as a desktop.
    The reason was a default included mootools javascript files under the all html code. Downstairs.
    I just commented it
    <?php //echo $this->mootools; ?>
    Actually, that cannot be a solution. You must not comment this line, it is perfectly sufficient to disable the relevant MooTools or jQuery templates in your page layout.

    Concerning your initial problem: Have you modified the page template "fe_page.html5"? Seems like there is no viewport meta tag in the generated HTML markup.

    By default, the page template includes the line
    PHP Code:
    <?php echo $this->viewport?>
    in the <head> section what subsequently translates to
    HTML Code:
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    in the front end HTML markup.

    The viewport meta tag will ensure that the website is properly scaled on mobile devices.
    Contao Community Moderator
    → Support options

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
  •