Welcome, Guest
Username Password: Remember me

Own template with mobile Joomla
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Own template with mobile Joomla

Own template with mobile Joomla 13 years, 1 month ago #5996

  • kic
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Hi, i have a question regarding templates with Mobile Joomla, i have created a template and want to use it with mobile devices, but i can't get i to work correctly, with the menus, i have created a second menu i Joomla administration module, and i have then linked the module to that specific menu, but when i see the page on my mobile, it comes with all the menu items that i have in my main menu, is there something i need to change in my template to make it work, because when i use the built in pda_mobile template, it works fine......hope someone can point me in the right direction.

Re: Own template with mobile Joomla 13 years, 1 month ago #5998

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
What menu module do you use?
In the case of using Mobile Menu (mod_mj_menu) module you can either to set items to hide, or choose corresponding menu to display.

Re: Own template with mobile Joomla 13 years, 1 month ago #6000

  • kic
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
I have tried severel menus, but when i use the mobile menu, i correspond to the "mj_pda_header2", and i don't have that posistion in my template, can i change that position to my own in mobile admin module? to ex. mobile_user3?, or do i need to alter my template to match all the names in pda_mobile template.

Re: Own template with mobile Joomla 13 years, 1 month ago #6005

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
MJ templates have no fixed position names. Instead, they get names from MJ settings. You can use similar way in your template, i.e.:
<?php
defined('_JEXEC') or die('Restricted access');
defined('_MJ') or die('Incorrect usage of Mobile Joomla.');
$MobileJoomla =& MobileJoomla::getInstance();
//......................//
$modulepos = $MobileJoomla->getPosition('header');
if($modulepos && $this->countModules($modulepos) > 0)
$MobileJoomla->loadModules($modulepos);
Last Edit: 13 years, 1 month ago by dryabov.

Re: Own template with mobile Joomla 13 years, 1 month ago #6014

  • kic
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Hi Dryabov, Thanks for your reply, but just so that i understand this correct, i can take the script you wrote, and put it in my own template?, my template is created with artiseer, just so you know. But the thing that confuse me a little, is that i have to choose a position in the module, and i also need to make a position selection in the mobilejoomla setting, etc. mj_pda_header2, and that isn't logical to me, but maybe i am a little slow.....Hope you can clear this out for me.

Re: Own template with mobile Joomla 13 years, 1 month ago #6018

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Actually, you can use "standard" positions with fixed names, but in this case you cannot use MJ feature to change position names in MJ settings.

And as far as I remember, Artiseer creates fixed-width templates, but different mobile phones have different screen sizes (and some of phones can work in both vertical and horizontal orientations).

Re: Own template with mobile Joomla 13 years, 1 month ago #6020

  • kic
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Okay, i'm a totally noob here now, could you guide me in how i use standard positions with fixed names?, i know t.ex that the menu i would like to see is called user3 in the template, and i have read that i can use a global suffix for the module, but i don't know how to use it correctly.

Re: Own template with mobile Joomla 13 years, 1 month ago #6022

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
kic wrote:
Okay, i'm a totally noob here now, could you guide me in how i use standard positions with fixed names?, i know t.ex that the menu i would like to see is called user3 in the template, and i have read that i can use a global suffix for the module, but i don't know how to use it correctly.


The standard Joomla way to insert module position is to use jdoc tag:
<jdoc:include type="modules" name="user3" />

Note that in this way the position name cannot be changed without modifying of the template.

Core MJ templates use more complicated way: they get position names from MJ settings and insert jdoc tag dynamically by call to $MobileJoomla->loadModules. But this fact doesn't mean that MJ cannot use templates with "fixed" position names. So, you can use any way.
The following user(s) said Thank You: kic

Re: Own template with mobile Joomla 13 years, 1 month ago #6023

  • kic
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Hi Dryabov, i will give it a try.....thanks alot for your help, and sorry for all the questions, but i am new to joomla, and also new to mobile joomla, but hopefully, i will learn along the way.
  • Page:
  • 1
Time to create page: 0.19 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.