1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Tips and Suggestions in Joomla

Discussion in 'Joomla' started by Rankx, Apr 21, 2013.

  1. #1
    Hi guys,

    I've been using Joomla for almost 5 years now and I have completed many websites in Joomla. I just wanted to share some knowledge with any developers or others that would find it beneficial.

    Firstly there are a few extensions that I always install because I know I would need them.
    • Admin Tools - Great security features
    • Akeeba Backup - Always want to backup the site and be able to restore
    • JCK Editor or JCE Editor (another editor of your choice is fine, i hate the default)
    • Modules Anywhere - This always comes in handy
    Based on what you want to do you will need specific components for those. Typical functions you would need are:
    • Slideshow - I use LV Enhanced Image slider, DJ Image Slider or Slideshow Ck
    • Newsletter/Subscription - ACYMailing
    • Searchbox - Rokajax search
    • Article Summary - News Pro Gk4
    • Modal pop up boxes - Fancy Pop up, Modalizer and a lot more
    • Drop down Menu - Maximenu CK
    Of course there would be more to this list which I am sure we can discuss later on. Here is a common situation you might come across when building your site.
    Say you have a sidebar that you do not want appearing on every page of your site. Where you do not want to have the sidebar appearing you want the width of the content area to be 100%. There might be other ways to deal with this but this is what I do.
    First, you need to be able to control which pages you want the sidebar appearing on. So you use a module position to control that. So before the opening div of your sidebar you would say.

    
    <?php if($this->countModules('Name_Of_Module_Position')){ ?> 
    <div id="sidebar">
    <!-- contents -->
    </div>
    <?php ;} ?>
    
    Code (markup):


    Then in the module manager in the admin section, you choose which pages you would like that module to appear on, select the module position and the sidebar would appear on those pages. I normally use a module that I know always be in the sidebar anytime the sidebar needs to be shown.
    Next, you want to be able to switch the width of the content area. You can do this using JavaScript. So the code will look something like this:

    
    <div id="content">
    <?php if($this->countModules('Name_Of_Module_Position')){ ?>
        <script language="javascript" type="text/javascript"> 
          document.getElementById("content").className += "reducedwidth";
      </script> 
        <?php ;} else{ ?> 
        <script language="javascript" type="text/javascript"> 
        document.getElementById("content").className += "fullwidth";
      </script>
    
    Code (markup):

    What this does, is that it once the module position is active on the page (meaning the sidebar is showing up), it applies the css class named 'reducedwidth' to the content div. In your css file you would need to say:
    
    .reducedwidth
    {width:650px (or whatever is the width of the content are with the sidebar)}
    
    Code (markup):
    You would also need to have the class fullwidth, where you specify the width to be 100% or how much pixels you need to define. This strategy can also work if on a specific page you need an extra column for a special module.
    Another situation.
    You need to have a module or a series of modules as the main item on the page instead of an article, and you do not want to complicate your template. This is where Modules Anywhere comes in. You set the module or modules in a certain module position. Create a new article and add the code {modulepos [name of module position]} and all of the modules would be loaded in the article. You can also say {module [name of module]} where you can specify the name of the actual module.
    I would like anyone else to share any other extensions they recommend for certain functions and also to give solutions to any common problems we face when building Joomla sites. Thanks guys.
     
    Rankx, Apr 21, 2013 IP
  2. JoomlaDesigner

    JoomlaDesigner Active Member

    Messages:
    956
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Appreciate your effort and time in writing these nice tips mate.. It's very useful for beginners.. :)
     
    JoomlaDesigner, Apr 26, 2013 IP