views:

44

answers:

2
+1  Q: 

HTML for FireFox

I am working with Joomla. I would like to display a certain module if the user has all browsers, except FireFox, and display another module if user has FireFox browser. I know that I can do targeted browser CSS styling, but in my case I need the user's browser to choose between an excerpt of HTML code (for all browsers choose this module, for FireFox choose the other module). Since for CSS browser targetting we simply add the @-moz-document url-prefix() { .selector { style... } }, I am hoping there is a simple HTML line that is analogous to be used in the HTML file to render either one line of code, or another line of code based on the browser's engine. I fear I am not communicating clearly. Any help would be great.

Thanks,

A: 

Perhaps this Joomla extension is what you're looking for:
http://extensions.joomla.org/extensions/style-a-design/templating/11833

Drackir
I thought of this, but the module I am displaying renders its own "inline" styling. As I write this, I am trying to override the inline style of the module with the following CSS .block span[style]{ font-weight: normal !important; color: #000 !important;} that would style <div class="block"> <span style="font-weight: bold; color: red;">Hello World</span></div>
veronica
Does that prevent you from using the extension somehow?
Drackir
Thank you, I copied template, created two different module positions for the intended module, and created different modules with specific specs for FireFox. Creative solution. It worked!
veronica
I'm glad it worked for you!
Drackir
A: 

I don't know joomla supports any attribute for module calling in template. You can try with following code:

<?php 
if(stripos($_SERVER['HTTP_USER_AGENT'], 'firefox') === false) {
   echo '<jdoc:include type="modules" name="other_module" style="xhtml" />';
}else{
   echo '<jdoc:include type="modules" name="firefox_module" style="round_box" />';
}
?>
Muhammed Imran Hussain