Fixing Itemids for Joomla / K2's tag view
This article is about K2, which works with Joomla.
We created menu items pointing to “generic” tag views. Each tag has its own Itemid, which is fine. However, when you click on “read more” for any of the items on the generic tag page, the ‘read more’ link uses the default K2 Itemid rather than the Itemid of the current page / menu item. This does seem like a bug to me. The read more links should use the Itemids of the current page or at least the menu item that brought the viewer to that ‘read more’ link.
In our case, K2′s default Itemid is 17 (as set in the menu). We also have a menu item for a tag view, with an Itemid of 37.
The ‘read more’ URLs should have been in this format:
index.php?option=com_k2&view=itemlist&layout=generic&tag=Health%20Care&task=tag&Itemid=37
.. but were showing up as:
index.php?option=com_k2&view=itemlist&layout=generic&tag=Health%20Care&task=tag&Itemid=17
We have written a small override that solved this for us, since I could find no other way to solve this. We dislike core modifications but in this case it seemed to be the only way:
In /components/k2/models/item.php around line 62 (search for “read more link” .. it should be the first one), add this:
//mod to replace K2 Itemid with current page’s Itemid.
if(JRequest::getVar(‘Itemid’) && JRequest::getVar(‘layout’) && (JRequest::getVar(‘layout’) == ‘generic’) && JRequest::getVar(‘task’) && (JRequest::getVar(‘task’) == ‘tag’)){
//MAKE SURE TO CHANGE “Itemid=17″ TO WHATEVER ITEMID YOUR K2 USES:
$link = str_replace(‘Itemid=17′,’Itemid=’.JRequest::getInt(‘Itemid’),$link);
}
//end
Impressions of Joomla 1.6 Beta 3
Well, Joomla came out with another 1.6 beta, and it has certainly come a long way. I remember testing a 1.6 beta two years ago. Here are some highlights;
Access Level Control (ACL)
It now features a robust ACL system, though some of the inheritance rules will take some getting used to. This is often cited as a feature Drupal has and Joomla lacks, but soon enough that will be a moot point. From my understanding there will be just one more beta in about two weeks, and then it should be time for 1.6!
Nested categories
Joomla always suffered from a rigid approach to categorization, with Sections and Categories. A section could contain categories, but there could be no sub-categories. This long-running annoyance has finally been been vanquished with Joomla 1.6. It uses only categories (no more sections!), and they can be nested as deeply as you want. I’m sure at some point someone will nest a category 666 levels down, and run into a terrible bug there … but in theory it should be fine, because a category would simply be assigned to a parent category .. the number of sub-levels should have no bearing on it.
Drupal has of course supported nested categories for a long time, where they are called Taxonomy. I think Drupal’s Taxonomy is still more advanced than Joomla 1.6′s category system, but for many, perhaps most users, just having nested categories is en0ugh. Those who want to do more advance PHP magic will naturally be more inclined towards Drupal anyway, and to words like Taxonomy.
The elimination of Joomla’s sections does mean that template code that relies on section IDs will have to be changed to be 1.6-compatible. It will have to check for category IDs instead. It also opens up an interesting possibility of (for example) using a database query to select only those categories that are nested within the current category. That could come in handy in displaying category ‘blogs’ or headlines in a more automated fashion than creating menu links. And speaking of menu links;
Menu Management
Joomla’s menu management has gotten very slick;
- Changing the menu type is now faster.
- Much more control over the menu items: meta data, page titles, robot rules, page class styling, menu link title & CSS attributes.
- Module assignment from a menu item. You can still assign modules to menu items, but now you can also do this from the menu item itself, rather than having to edit the module separately.
- Batch processing multiple menu items
- Language filtering; show your menu item only for certain languages, or for all of them. Would be nice if you could select several languages and hide it on others, but that may be coming.
- Set template style
Redirect manager
Joomla 1.6 has a new component for managing URL redirects. Presumably this writes to the .htaccess file and created a 301 redirect.
Banner Manager
This is not too different from the 1.5 version, but features “Tracks”, which tracks clicks and impressions in date-filterable and CSV-exportable fashion. Finally we will be able to do some more robust reporting.
I am however baffled that banner clients still have no way to log in and view their banner’s statistics. I think most clients would want that, and offering that ability will help site owners gain more advertisers.
I wrote a Joomla 1.5 hack that got around this by using the “alias” field of the banner client to hold a username. That allows us to associate a banner client with a username, and then we can use that to display banner statistics to a given Joomla user (and only that user). Looks like I will have to port that hack to 1.6. Sigh.
Recurring payments with Joomla
Say you want to be able to charge customers with recurring payments, say, every month. I have recently been doing quite a bit of work on that front.
Review of Concrete5 CMS vs. Joomla / Drupal / WordPress
While Joomla and Drupal are the leading open-source CMS systems in terms of adoption by developers, both still have room for improvement (and are indeed improving rapidly). In a nutshell, Joomla comes pre-installed with most everything you would expect to have on a site, and with a few extra addons you’re good to go. The Joomla 1.5 MVC architecture is powerful and the template coding is a clean and straightforward implementation of views in an MVC structure. On the other hand, Drupal is a framework that can be a blog, corporate site, social community, you name it. Out of the box it is not going to do very much for you; it requires customization, adding modules, etc. It offers much more fine-grained control over user permissions, event triggers, customizable views of content presentation (the “Views” module together with CCK), and .. dare I say it … an awful theming system. Consider it the price to pay for getting to use what is certainly a very powgerful system.
In terms of interface usability (for the regular user, not us web developers), Drupal and Joomla both can be quite easy to use, but not out of the box. Drupal takes a bit more work to get user-friendly. Especially input formats need attention. The FCK editor with IMCE for file uploads is great, and the Wysiwyg module is probably the next big thing in Drupal editors – very nicely done.
WordPress beats both Joomla and Drupal in usability, hands-down, but customizing WordPress to make it function like a CMS is not as simple as one would like. It’s not WordPress’s fault: it’s a blogging platform.
OK, and now the reason for this post. Concrete5.
Concrete5 is yet another CMS built on PHP/MySQL, and claims to beat Joomla and Drupal, both in terms of usability and superior code. A big claim, for sure. We tried it out on the Plethora Design development server and LOVED the ease of use when editing pages and customizing the look and feel of things. Joomla has some extensions that allow in-line editing, but not in-line template modification like this, except in very early alpha stages. Drupal is working on similar things but this is all still in alpha and beta, and months if not years way from being in core. So, one point for Conrete5.
Since it claims to be so easy to use, I tried to put myself in the shoes of one of our clients. I gave myself 10 minutes to figure it out, with using any tutorials or documentation, because if it is easy to use, tutorials and documentation should not be needed. So here’s what I did. I said to myself:
“I want to add a page. Oh, look, there’s an Add Page button”. Great.
“I need to edit this page. Aaah, an Edit Page button.” Cool.
What is especially wonderful is the ability to drag and drop page elements on the fly, and there is a nice context menu available when you click on an editable item.
Note that frontend editing is possible with both Joomla and Drupal but Concrete5 presents it in a (much) slicker way.
A very nice feature is the ability to edit the built-in image gallery.
Well, that covered most of the needs a small “brochure” site might need.
Last item;
“I need to add a contact form and also an application form with file uploads.”
I was not able to find a way to add a form. I know in Concrete5 forms are called “widgets” and you can also use external forms. Why is there no simple “Add Form” button like there is an “Add Page” button? I could find no way of doing this, even though the default installation (with sample data) does have an About page with a form embedded in it, and there is a Forms core block installed by default. I also know that file uploads are supported on forms. That’s all well and good, but now I want to add one, and I can’t. I spent about 10 minutes looking into this, checking their forum and documentation, and was none the wiser. I’m sure the answer is simple, but it should be obvious, especially for a CMS claiming such superiority. I may give it a whirl again at some other time, because it does look very well-suited to small sites … not for anything beyond that in my opinion (although I do realize it has a solid API and a dedicated developer community, so I could be taking this back in the future!).
Update:
See Tony’s comment below and this screencast on how to add a form in Concrete5. More videos for end users here.
Adding forms *is* very easy. The “Add to Main” link is not visible enough, but once you know where to look it’s not a problem. I think there ought to be an “add to main” icon floating to the left or right of the main content area, so one doesn’t need to scroll all the way down the page to find it. But the form editing here certainly blows Joomla and Drupal out of the water with its ease of use.
Conclusions
In terms of ease of use it is in the same league as hosted site builders such as Google Sites and Yahoo SiteBuilder (and that is not an insult!!), but with more control, and the ability for developers to extend the functionality. It’s as easy to use as WordPress, with the added bonus of being able to adjust the look and feel on the fly too. Overall it looks like a great CMS and is worth trying out. Why haven’t Joomla and Drupal added this kind of easy editing, after their many years and thousands of dedicated developers? It’s a bit baffling.
Upcoming art show(s) in Boston
For those of you who will be in Boston in July, check out JP Licks in Jamaica Plain for my sister’s artwork. She lists her upcoming shows and past shows on her site. Hers is also a site I recently converted to Joomla.
Armitage Gone Dance Think Punk Videos & photos

Lou Reed, Laurie Anderson, and Karole Armitage
In 2006 I designed a brand-new (and, incidentally, award-winning) site for a New York dance company called called Armitage Gone! Dance. At that time it was designed using Dreamweaver templates, and it was maintained using Adobe Contribute. I recently converted it to Joomla.
Check out the new video and photos of Armitage Gone Dance’s 2009 Think Punk event. Among those in attendance were Lou Reed, Calvin Klein, David Salle, Karole Armitage, Jeff Koons, and Rufus Wainwright. I like to follow my customers’ growth, and hold out hopes of being invited so I can get to meet some of these people … if you’re reading, Lou, contact me.
