I have a module with a few text input fields. For example:

menu a
menu b

I also have two menu types, each for different sections of the site. Is it possible based on which menu type the module is assigned to to determine which field is shown in the Joomla admin?

  • Why? What are you using the distinction for? – David Fritsch Sep 10 '14 at 1:05
  • Based on the way modules are designed and the purpose they serve, I don't think this is possible. Something close to this is to develop a dynamic module, that will display content based on the page/menu item it is displayed and relative settings to manipulate module behavior in the backend. What do you have in mind though? – FFrewin Sep 10 '14 at 7:44
  • @DavidFritsch, we're using it to configure our desktop and mobile sites separately. We don't currently have a responsive mobile site, so its kind of like we're running two sites from the same admin. – ContextSwitch Sep 10 '14 at 15:01

You can detect the Browser (mobile or not) to show the fields. For example: Android, Blackberry, IE Mobile, iPad, iPhone, iPod Touch, NetFront, Nokia, Opera Mini, Opera Mobile, UC Browser.

You can find a handy detection routine in NoNumber's Advanced Module Manager.

|improve this answer|||||
  • Sorry, the browser doesn't actually matter to me. My question is specific to the joomla administrator. If you rename the menus 'menu a' and 'menu b', for 'menu a' I need the 'menu a' param to be visible in the administrator tool, for 'menu b' I need the 'menu b' param. Is that possible? – ContextSwitch Sep 10 '14 at 13:39
  • Sorry, it's not clear what you are looking for... you can detect the current menu, and load menu parameters from the module – Anibal Sep 10 '14 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.