XML SiteMap

Mod to a mod...

I was rummaging through the Joomla! Extensions Directory looking for a simple module to list the weblinks component in a module position. I found one that was simple, lightweight and worked well, db8 Latest Weblinks.

It installed easily, and displayed my weblinks where I needed them, but there was one quirk I didn't quite like. The ordering of the links seemed kind of odd, it ordered the links by the latest date. Wanting a bit more control over how the links were displayed, I poked through the parameters but there were no options to sort by "order". So into the code we go...

Line 33 of helper.php

change: ' ORDER BY a.date DESC'

to: ' ORDER BY a.ordering ASC'

Thats it! Now you can order your links in the Weblinks Component as you normally would for any articles etc, and the links will display in the module as you want them ordered. You can also change the ordering by title, etc by just using a different column in the database to sort by.