Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Any way to show a module based on UserAgent?Any way to show a module based on UserAgent?
Previous
 
Next
New Post
3/24/2010 6:55 AM
 

I would like to display a module if the user is using a mobile device. For example, a banner like "View the iPhone version of PokerDIY" or something (instead of redirecting them immediately. This is quite common on many sites when you view it with an iPhone UserAgent.

Are there any module wrappers that can do this (or any suggestions on how to do this?)

 


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
3/24/2010 10:03 AM
 

 

Rodney,

Seems like you are having quite a time getting your mobile version working the way you want :)  One way you might be able acheive what you want is to use a little JQuery combined with checking the user agent in the skin.

Steps:

Put your banner on the page, wrapped in a div with a specific css class that is set to hide the div. (say "mobileonly" )  You could do this in an html module or even create a seperate container.

In your skin Onload or init event, check the user agent and set some flag (boolean, isMobile) to true or false.  Then use that flag to set the correct Jquery function to show or hide the divs with that class.

That should do it.

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Any way to show a module based on UserAgent?Any way to show a module based on UserAgent?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out