0
Welcome Guest! Login
0 items Join Now

Mobile Tutorial

  • Re: Mobile Tutorial

    Posted 12 years 10 months ago
    • I'm actually having trouble finding where the code changes orientation for the CSS files to adapt.

      Here is an example of what a JS code would do. I'm looking to made code changes to components that need to be displayed slightly different based on the orientation of the phone.

      If it doesn't exist, where can I input this type of change?
      function orient()   {
                switch(window.orientation){
                case 0: document.getElementById("iphone_css").href =  "css/portrait.css";
                break;
                case -90:  document.getElementById("iphone_css").href = "css/landscape.css";
                break;
                case 90:  document.getElementById("iphone_css").href = "css/landscape.css";
                break;
                }
                }
                window.onload =  orient();
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Mobile Tutorial

    Posted 12 years 10 months ago
    • Hi, if you're looking to add scripts to the mobile files, it works the same way in all Gantry templates. Open the index-iphone.php / index-android.php files - in the head section, you'll see our scripts. You can either place your script in the head, or place your script in a js file and place the file in the templates js folder and use this call in the head:
      $gantry->addScript('myscript.js');
      Obviously, use the name of your javascript file in place of myscript.js.

      Beyond to how implement new scripts, custom javascript isn't something we can offer advice on here. Not just for mobile, but for our templates in general. It's outside the scope of support we can provide on the forum.
    • The difficult we do immediately, the impossible takes a little longer.
  • Re: Mobile Tutorial

    Posted 12 years 9 months ago
    • Hi Cliff,

      I'm using version 1.6.2 of the Juxta template but can't find the index-iphone.php and index-android.php files. Aren't those available for this template?

      Regards,

      Pieter-Jan
    • Pieter-Jan de Vries
      ---
      Obix automatisering
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Mobile Tutorial

    Posted 12 years 9 months ago
    • I looked into this, it appears that Juxta was the last template we made that did not have an included mobile theme. Every theme after that has one, but Juxta and all before it do not.

      Since it's a Gantry template, it has the support for mobile themes at this point. It's just not included because Gantry didn't have that feature until after it was released. We generally don't go back and add features into previously released templates.

      Creating the files on your own is the only option here. There isn't any other solution we can offer as it's not part of the template.
    • The difficult we do immediately, the impossible takes a little longer.
  • Re: Mobile Tutorial

    Posted 12 years 9 months ago
    • Is it possible to make copies of this files from later templates and use them for Juxta? If yes; is ther a lot off difference between them, and which one can be used without to much changing the code?

      Thanks for an reaction

      Manuel
  • Re: Mobile Tutorial

    Posted 12 years 9 months ago
    • Hi Cliff,

      Thanx for the reply and apologies for the late response, but I didn't receive a notification. Weird, because I did about Manual's reaction. I'm very interested in your answer to his questions.

      Regards,

      Pieter-Jan
    • Pieter-Jan de Vries
      ---
      Obix automatisering
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Mobile Tutorial

    Posted 12 years 9 months ago
    • The answer is that I'm not sure if it's going to be that easy. You could try and grab the files from a newer template, I would suggest one that was released around the same time. Not all of our templates use the exact same structure, so the structure of the mobile theme may not jive with both templates.

      Either way, there isn't going to be any built in styling for the mobile theme on that template - because it wasn't included with the release - it also may be missing Javascript files and it doesn't have the code for the backend mobile controls.

      You can get it to work, but it's probably going to take more work than just copying a single file from another template unfortunately. It would probably take going through the mobile index file, adding code to the templateOptions.xml, adding CSS and Javascript. It's possible, but there isn't an easy answer.
    • The difficult we do immediately, the impossible takes a little longer.
  • Re: Mobile Tutorial

    Posted 12 years 9 months ago
  • Re: Mobile Tutorial

    Posted 12 years 8 months ago
    • Hello Cliff and Pieter,

      I tried to use mobile Joomla but the template-layout and structure is not ass I would like to use it. Is it maybe possible to make a new menu or copy the Main Menu, and to assign a newer template to this/these new menu items only for mobile use? Or does the usability of my site will come in danger then?

      Manuel
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Mobile Tutorial

    Posted 12 years 8 months ago
    • Hi, you can make a new menu, then select it in the Mobile settings with the menu drop down.
    • The difficult we do immediately, the impossible takes a little longer.

Time to create page: 0.104 seconds