Home Simple 1 SectionEx - By Robert Kuster
SectionEx - By Robert Kuster PDF Print E-mail
User Rating: / 23
PoorBest 
Written by Administrator   


9. July 2008:

Important note: I'm really sorry to announce that for personal and professional availability reasons I can no more support the project. SectionEx 1.5.0.13.d was my last release of SectionEx.

But thanks to Azrul new SectionEx support is already on the way. In the following days the component will be transferred to Azrul who will polish it up, maintain it, and take over new releases. And more. Finally SectionEx will get a forum-based support, a feature many of you have requested so often. What more could one possibly ask for. Also note that always a free un-commercial version of SectionEx will be available even in the future.


Contents

Download

About

SectionEx will list all articles within a section, grouped by categories. It combines and extends Joomla!'s build in "Section Layout" and "Category List Layout". The output will have the following form:

  • Category 1
    • Article 1-1
    • Article 1-2
    • Article 1-3
  • Category 2
    • Article 2-1
    • Article 2-2
    • Article 2-3
  • ...
  • Category n
    • Article n-1
    • Article n-2
    • Article n-3
SectionEx is written for Joomla! 1.5 using its MVC (model-view-controller) architecture. It is not compatible with previous versions of Joomla!.

 


Usage

SectionEx has no administrative settings. It can be fully configured through menu parameters. To use it:

  • Go to Menus
  • Select a menu item
  • Change menu item type to SectionEx -> Section-Category-Article List
  • Select a section from the parameter list on the right side
  • Possibly change any other parameters
  • Click Save

 


Examples

a) Ordinary output

Example Image

 

b) Output with expandable descriptions

Example Image


Behind the Scenes

..or why the select menu item type is called "SectionEx->Category->Section-Category-Article List" instead of "SectionEx->Section->Section-Category-Article" or something more adequate. After all we are displaying a section, aren't we? Well.. it turns out that there is a good reason for such a naming.

As I started to write SectionEx I thought it was only about one or two simple SQL selects and about generating a HTML table. But I was wrong. The hardest part was to get the menu highlighted correctly and the pathway (breadcrumbs) displayed something one would expect. The problem is that as soon as we click on a link to an article displayed in our SectionEx's list, we transfer control to another component, the com_contetn this is (a default component installed with Joomla). As component's and menus in Joomla! are heavily connected and dependent on each other the question is how to fool the framework so that it highlights our SectionEx menu item, although a com_content component is now active? And how about the pathway? Just to ensure we are all on the same page - after an article is selected we would like the following result:

  1. Our SectionEx menu should remain highlighted even if we display an article with com_content
  2. The pathway should look like this: Home -> SectionEx Menu -> Article Title

To be honest I almost gave up at this point. It was my first Joomla! component and actually web-development is not what I'm doing for living. Then, luckily, the solution turned out ridiculously easy. To fix the menu we simply need to append ItemId=myMenuId to the generated URLs for our articles. ItemId is the parameter that Joomla! uses to decide which menu is highlighted. The pathway part turns out similar easy once you look at "..\components\com_content\views\article\view.html.php". There you will find something like this:

function display($tpl = null)
{
...
switch ($menu->query['view'])
{
case 'section':
$pathway->addItem($article->category, '...$article->catslug);
$pathway->addItem($article->title, '');
break;
case 'category':
$pathway->addItem($article->title, '');
break;
}
}
...
}
Oops? All we have to do to get the pathway rendered out correctly is name our view "category"? Yes, it is. In this case Joomla! does everything for us exactly the way we expect it. So while the chosen naming convention probably isn't the most logical one for a user, we just say: "Hey, forget about one confusing word as long as it makes our universe synchronized. And let's hope that future Joomla! updates wont break our simple rules used in SectionEx."

 

Share Your Link

You became a happy SectionEx user? Would it bother you to share your link with me?
It's nothing special.
I'm just curious about how you use SectionEx.

 

Final Note

If you like SectionEx a comment and a vote on http://extensions.joomla.org/ will be appreciated. Hey, after all you got a nice written and working component for free. A vote will take you 5 seconds and even a registration not more than 5 minutes. Compare those 5 minutes to several days that I spent developing SectionEx for my site. You agree that 5 minutes is a very fair price, don't you?

For those fellows who don't like SectionEx: There is a nice button called "Uninstall". Get rid of your SectionEx frustrations once and for all.