Archive

Archive for the ‘Joomla’ Category

JDoc Tag of Type “module”

September 12th, 2009 No comments

There are only a few words about jdoc tag of type “module” In Joomla! online docs. The docs shows attributes such as name, style, id by code snippet without any description on that. So I was confused when I tried this tag in my template. The problem is, as the name attribute refers to the module type, how can I specify the module instance I want? I searched google for many articles and got a anwser that when there are more than one modules of the type, the first one in order will be taken by Joomla!. Yes, that’s silly. At last I fount a related tracker item in JoomlaCode on which the author impied that’s a defect of Joomla! docs. There’s an attribute named “title” refering to the instance title actually.

As a newbie of Joomla! framework, I feel Joomla! docs are not friendly enough for a newer. Some of contents are out of date, while some features are not even mentioned in docs. For example, by common sense I guess I can pass parameters to module instance in my template, but I can’t find it in docs, either in sample templates. Just like what I did in recent days with Joomla!, I dug into the framework code to see what happend on the tag. The anwser is Joomla! sets a variable named “attribs” in the scope of the module which contains attributes in the tag in the form of name-value pairs. Well, Joomla! code is much more friendly to read then docs, although there are few inline comments…

Documents and community are really very important for an open source project.

Categories: Joomla Tags: , ,