Request a Quote

Or Call (905) 773-5079

Web Design, Development, Hosting, Maintenance and Consulting

To win online today, you need a catchy, professional web-presence.

Since 1994, we've designed and published dozens of web-presence, social, news, community, marketing, promotion and e-commerce websites. Our clients are small to medium businesses, minor sports teams and associations, individuals and non-profit organizations. We'll design a website to get you noticed!

If you build it, they will come. Online directories and single-page websites are so 2004.

Successful businesses know that standing out gets big results. Their marketing always includes a professionally designed and maintained multi-page, custom website. Their uniqueness makes the difference. We can make you stand out online with a clean, professionally designed and developed website.

Your business is dynamic. Is your website?

Success evloves from change. So does the web. Our 15+ years web experience gives us the knowledge of what works, what doesn't, and how. We keep up on all the new stuff with an eye to how it impacts users. Ongoing additions to your website + our advice  = a dynamic website that keeps visitors coming back.

You can spend tens of thousands of dollars on a website. But, is it worth it?

Some websites can cost that much. Most don't. Some of our competitors charge you for their purchase of expensive proprietary development environments and production software. We don't. Our work is based on standard, open-source (as in inexpensive or free) web platforms. You pay us for our time and expertise.

299Starter180

How to create module titles that link directly to other content in Joomla! 1.5.

This exercise came about because I wanted some of the ScottBinnie.com Home page Module Titles to include embedded links directly to articles and components in the site. Although I happened to be using Jumi as the module source (the modules simply contained intro text and teasers), the principle used can be applied to almost any Joomla! 1.5 module.

Before continuing, I would like to credit "Ollvin" on the Joomla! Forums who submitted the basic ideas in his post re: "Link module title" from June, 2008. I made a couple of changes and enhancements to his concept.

In any case, in Jumi, here's how to create Linked Module Titles:

1.1 Open the file "your_joomla_folder/modules/mod_jumi/mod_jumi.xml" where all the parameters fields are stored. These are the parameters that appear in the right column of the menu module properties page. (found in the admin under "Extensions / Module_Manager / Your_Jumi_Module).

1.2 Copy and paste a new Spacer <param...> line at the bottom of but inside the first <PARAMS></PARAMS> section.

1.3 Add a new <param...> line beneath it the name "titleLink" (this will appear as the variable name in the database), "size = 97" (so you can see the full URL when you enter it), the label "Title link URL" and the description "PARAMLINKURL". The line should look like:

<param name="titleLink" type="text" size ="97" default="" label="Title link URL" description="PARAMLINKURL" />

1.4 Add the following <param...> lines immediately below the one you just entered. They will enable you to redirect the link to a new browser window if you want.

       

            Existing Browser Window
            New Browser Window
       

1.5  Save the file back to it's original location.

2. Edit your Jumi module properties in the Module Manager. You will now see 2 new fields called "Title link URL" and "Link Destination" on the right in the Basic properties. Enter the link to the URL you want, select the destination and then save the module. (By the way, if you are curious, you can go to your database admin, table jos_modules, your_menu line and look at the field params. You will see "titleLink: followed by the URL you entered" proceded by "titleLinkDestination: followed by a 0 or a 1".)

3.1 Check to see if the file "your_joomla_folder/templates/your_template/html/modules.php" exists. If the directory is there but the file isn't, copy the "your_joomla_folder/templates/system/html/modules.php" file to the directory. If the "/your_template/html/" directory doesn't exist, create it, and then do the file copy. Each function() {...} block enables you to apply specific styles to the "<jdoc:include type="modules" name="X" style="Y"/>" tags in your index.php template file.

3.1.a  If you had to copy the file, make sure to open the NEW copy and delete any existing function blocks in it - they can't exist in both files without potentially causing an error

3.2 OK, now open the new copy or existing file and copy the following function block into it :

function modChrome_linkTitle($module, &$params, &$attribs)
{
    $headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
    if (!empty ($module->content)) : ?>
       

 


           
            if ($module->showtitle) :
                 if ($params->get('titleLink') !="") :
                    $destination="";
                    if ($params->get('titleLinkDestination') ==1) :
                        $destination=" target=\"_blank\"";
                    endif;
                    echo "get('titleLink')."\"".$destination.">".$module->title."";
                endif;
            endif;
            echo $module->content;
            ?>
       
   
}

3.3 Save the file and open your "your_joomla_folder/templates/your_template/index.php" file. Identify the "<jdoc:include type="modules" name="X" style="Y"/>" tags that you wish to enable title linking, and change the "Y" to "linkTitle".

3.4 Save the file. Now (after refreshing your browser window) you should be able to click on the title and it will take you where you want to be taken. If not, make sure that you entered the link in the Module Properties screen in admin and saved it.

All that may be left (if as in my case, you needed different text colors for different module positions) would be to add a CSS_suffix to your CSS file as well as in the Module Properties (Advanced).

NOTE: To use this function for modules other than those using the Jumi code, you should simply have to modify the appropriate XML file in that module's directory.

 

If you found this tutorial useful and timesaving, a small donation for the work is always appreciated!
Thanks!

Some of Our Work...

By A Web Design Company

Share to Facebook Share to Twitter Share to Linkedin 

Home   |   About   |   Services   |   Specials   |   Articles   |   Contact   |   Our Terms   |   Sitemap