This is how you apply the switches:

switch: -1
Strips all surrounding code from the module.
 <?php mosLoadModules ( 'user1', -1 ); ?>

The outputted html code looks like this:

<divclass="user1_inner">
<ulclass="latestnews">
  <liclass="latestnews">
  <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=3&Itemid=9"    
 class="latestnews">Newsflash 2
  </a>
  </li>
   <liclass="latestnews">
  <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=4&Itemid=9"  
 class="latestnews">Newsflash 3
  </a>
  </li>
  <liclass="latestnews">
  <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=2&Itemid=9" 
 class="latestnews">Newsflash 1
  </a>
  </li>
  <liclass="latestnews">
  <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=9&Itemid=2" 
 class="latestnews">
  Example News Item 4
  </a>
  </li>
  <liclass="latestnews">
  <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=7&Itemid=2" 
 class="latestnews">       
  Example News Item 2
  </a>
  </li>
</ul>
</div>

switch: -2
Puts the module's title in a h3, and wraps the entire thing in a
 <?php mosLoadModules ( 'user1', -2 ); ?>

The outputted html code looks like this:

 <divclass="moduletable">
 <h3>Latest News</h3>
 <ulclass="latestnews">
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=4&Itemid=9" 
  class="latestnews">Newsflash 3
   </a>
   </li>
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=2&Itemid=9" 
  class="latestnews">Newsflash 1
   </a>
   </li>
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=3&Itemid=9"  
  class="latestnews">Newsflash 2
   </a>
   </li>
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=6&Itemid=2"
  class="latestnews">Example News Item 1
   </a>
   </li>
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=9&Itemid=2" 
  class="latestnews">Example News Item 4
   </a>
   </li>
 </ul>
</div>

switch: -3
Puts the module's title in a h3, and ads several layers of divs that can be used to apply CSS techniques with rounded corners
 <?php mosLoadModules ( 'user1', -3 ); ?>

The outputted code looks like this:

 <divclass="module">
 <div>
 <div>
 <div>
 <h3>Latest News</h3>
 <ulclass="latestnews">
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=4&Itemid=9"      
  class="latestnews">Newsflash 3
   </a>
   </li>
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=2&Itemid=9" 
  class="latestnews">Newsflash 1
   </a>
   </li>
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=3&Itemid=9" 
  class="latestnews">
   Newsflash 2 </a> </li>
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=6&Itemid=2" 
  class="latestnews">
   Example News Item 1
   </a>
   </li>
   <liclass="latestnews">
   <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=9&Itemid=2" 
  class="latestnews">
   Example News Item 4
   </a>
   </li>
 </ul>
 </div>
 </div>
 </div>
 </div>

If there is no switch at all:

 <?php mosLoadModules ( 'user1'); ?>

The outputted code looks like this:

 <tableclass="moduletable"border="0"cellpadding="0"cellspacing="0">
   <tbody>
     <tr>
       <thvalign="top">
      Latest News
       </th>
     </tr>
     <tr>
       <td>
       <ulclass="latestnews">
         <liclass="latestnews">
         <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=4&Itemid=9"
        class="latestnews">Newsflash 3
         </a>
         </li>
         <liclass="latestnews">
         <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=2&Itemid=9"
        class="latestnews">
         Newsflash 1 
         </a> 
         </li>
         <liclass="latestnews">
         <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=3&Itemid=9"
        class="latestnews">Newsflash 2
         </a>
         </li>
         <liclass="latestnews">
         <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=6&Itemid=2"
        class="latestnews">
         Example News Item 1
         </a>
         </li>
         <liclass="latestnews">
         <ahref="http://localhost/projects/1112rc2/index.php?option=com_content&task=view&id=9&Itemid=2"
        class="latestnews">
         Example News Item 4
         </a>
         </li>
       </ul>
       </td>
     </tr>
   </tbody>
 </table>
 </div>

In Joomla! 1.5 each switch has a style associated with it.

	    switch -3: $style = 'rounded';
            switch -2:  $style = 'xhtml
            switch  -1:  $stylle = 'raw';
            switch 0 :$style = 'table';

Posted in: Joomla

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677