Adding ‘first’ and ‘last’ classes to Joomla 2.5 Menu Items

Written on 03/02/12 • 0 Comments

Adding classes to the first and last element in navigation menu can be helpful in defining menu styles. We can easily add extra class “first” and “last” to the respective elements of the menus by adding a few lines to the menu module code. This as far as I know has never been a feature in Joomla, going forward adding the classes should be made redundant as support for CCS3 matures and we can reliably use the CSS3 Pseudo-classes :first-child and :last-child but until then.

Joomla 2.5.0 has a mod_menu (Joomla 1.7 used mod_mainmenu) module for creating menus. Joomla allows the users to create overrides to get this special enhancements. We want to make an override to Joomla’s ‘mod_menu’ module to get our first and last class finctionality. This will allow your modifications to remain after a Joomla update.

The overrides are placed in a folder named “html” inside your template folder. Inside “html” place another folder called “mod_menu” to specify the override. Next, copy the file default.php from modules/mod_menu/tmpl from your joomla filesystem to newly created override folder (mod_menu). Your default.php file should now be located at templates/{your_template}/html/mod_menu/default.php.

Continue Reading

How To Setup A Local DNS Host File On Mac OS X

Written on 20/01/12 • 0 Comments

A local DNS host file can be useful when developing a website. You can have a build environment and a production environment and simply point the host to the build environment on your machine, and your machine only, while all of the other users are directed to the live site. This allows you to work on the build environment and fully test prior to pushing the changes to the live production site.

Continue Reading

Increasing the Number of File Links in Typo3

Written on 21/10/11 • 0 Comments

This is a problem I discovered when uploading files for a client into a Typo3 site. By default Typo3 sets a limit of 10 files it allows to be uploaded. If you try and upload any more you receive a generic error message in the form of a yellow triangle warning.

Continue Reading

Adding two Google Analytics accounts to one page

Written on 06/05/11 • 3 Comments

There are times when you would like to track your page visits using Google Analytics and also someone else wants to do the same. We have had this situation where the client wants to have the data in their analytics account and we also would like to track the site using our account. We have also had external SEO companies that want to track the site using their account.

Continue Reading

Useful Wordpress Snippets

Written on 15/04/11 • 0 Comments

There are loads of things that can be achieved very easily in Wordpress if you know how. Many of these things can be done in just one line of code, so here are a few that I have found useful in the past and want to keep a record of for use in the future.

Continue Reading

Displaying a From Field Depending on Previous Question using jQuery

Written on 07/01/11 • 1 Comments

Sometimes forms on websites can look daunting to users when there are lots of fields to fill out. A neat solution is to hide fields that are only required depending on a previous answer. In the example I have created suppose you have a form with a drop-down list of peoples titles we have all the usual titles included but what if a Professor filled out the form? We add another fields to the form for 'other' that only needs filling out if the correct title was not available in our drop-down. 99% of people filling out the form will not need to use this field so with a little bit if Javascript magic we can hide the field unless a user selects 'other' from the drop-down. This approach gives us much neater form for users who have Javascript enabled and will degrade nicely for those few who don't.

Continue Reading

More articles can be found in the archives, feel free to have a look around and leave your comments.

Try a sample pack of 10 Business Cards for free from MOO

Upload images for the first side of your card. Choose up to 10 different images or designs. We accept high resolution JPEG, PNG, GIF or PDF files. Free standard shipping is included.