Joomla! plugin sectionList
sectionList is a plugin for for Joomla! 2.5.x / 3.x / 4.x., displaying a list of articles assigned to a category within your text.
The configurable list will be grouped by category tree.
License
sectionList is published under GNU/GPLv3
System Requirements
- Joomla! 1.5 / 2.5.x / 3.x / 4.x
- PHP 5.x or newer (0.11+ tested up to PHP 8.x)
Install
Download the plugin using the link at the end of this page.
Install the package using the Joomla! Extension Manager.
Activate the plugin by either clicking on the “Status” column of the sectionList entry within the Extension Manager or Plug-in Manager or open the plugin-options by clicking on the name and change the status from “Disabled” to “Enabled”.
Uninstall
Uninstall the plugin by using the Joomla! Extension Manager. Don’t forget to remove all sectionList references within your articles!
Usage
To display the list of articles, add
{sectionlist ID}
at the position you want to insert the list. The plugin will replace the markup with the corresponding category list.
To find the ID for a category, have a look at the rightmost column of the Category Manager.
Options
- Heading level: Starting level of heading tags
- Start category title: Show title of starting category.
If ’no’ is selected, heading level of first category will still be ‘Heading level’ + 1 - List type: Type of list to display articles (unordered / ordered)
- Article count: show number of articles for each category
- Style: CSS style assigned to sectionList
- Sort by: Column the articles are sorted by
- Sort order: Order how the articles are sorted
- Limit: Maximum number of articles displayed (0 = unlimited).
This will limit the number of displayed articles for each call of the plugin, not for each category displayed. Be careful when using this option in recursive category structures. - Ignore categories: Comma seperated list of category ids to ignore
- Ignore ACL: Ignore accesslist and display links to all articles (pre 0.10 behaviour)
- Layout: Use article title for sectionLists or use custom layout
- Custom layout: Custom layout for sectionLists, see section “Custom layout” for details
- Date format: strftime compatible string, without the leading ‘%’
Custom layout
After enabling the custom layout option, the contents of the “custom layout” box will be used instead of the linked article title to generate the lists.
Within this box, you define the contents between the opening and closing “<li>"-tag of each list item using standard HTML code and some special tags to insert the article data.
To do exactly what the “title”-layout option does, enter
<a href="###url###">###title###</a>
Besides the URL and title, there are several other tags you can use:
- ###alias###: the alias of the article
- ###aliasname###: the “created by” alias name set in the publishing options
- ###author###: the author of the article
- ###date###: the date (and / or time) the article has been published
- ###id###: the id of the article
- ###title###: the title of the article
- ###url###: the url to the article
- ###username###: the Joomla! username
So using all possible options, you might also enter something like
On ###date###, ###author### (user ###username###) wrote an article
with the internal id ###id### and was aliased as '###alias###'.
To access this article, open <a href="###url###">###title###</a>
into the custom layout box.
Disclaimer
This software is provided as is without any guarantees or warranty.
Use at OWN risk!
Download
Download and usage is not recommended for new installations.
Download (sectionlist v0.11 for Joomla! 2.5/3.x/4.x; ZIP-archive; 22kB)
Download (sectionlist v0.1 for Joomla! 1.5; ZIP-archive; 2kB)
Changelog
0.11 [2024-04-25]:
- added: Joomla! 4.x compatibility
- changed: URL of update file (rewrite for old URL is in place)
0.10.5 [2017-09-27]:
- fixed: sectionList will ignore categories which are not published
0.10.4 [2017-04-26]:
- fixed: updated code to prevent PHP7 “deprecated” warning
0.10.3 [2017-04-09]:
- fixed: option “Start category title”
0.10.2 [2016-04-25]:
- added: option to ignore ACL (pre 0.10 behaviour); thanks to Wim for suggesting
0.10.1 [2016-04-02]:
-
fixed: several notifications during link creation; thanks to MM for reporting
-
changed: minor code cleanup
0.10 [2016-03-03]:
- added: access level handling
- added: option to exclude categories
- added: option to show article count for each section
- fixed: heading level
0.9 [2014-03-09]:
- added: Joomla! 3.x compatibility; thanks to Cooper Brislain
0.8.1 [2013-09-17]:
- fixed: default settings; thanks to enoctis for reporting
0.8 [2013-05-13]:
- added: tags ###aliasname### and ###username### for the custom layout option
- added: sort options by id and by hits
- fixed: “Only variables should be assigned by reference” when using PHP 5.4x
0.7 [2012-10-11]:
- added: custom layout option
0.6 [2012-10-01]:
- added: sort option “published”; thanks to Taryn for suggesting
- added: option to limit the nuber of displayed articles for each call of the plugin; thanks to Taryn for suggesting
0.5 [2012-09-14]:
- added: sort options (sort articles by title or ordering; ascending or descending); thanks to Elisabeth Bartl for suggesting
0.4 [2012-07-04]:
- added: sectionList now supports updates using the Joomla! Extension Manager
0.3.2 [2012-07-02]:
- fixed: sectionLists are now also displayed in blog and frontpage view
0.3.1 [2012-07-01]:
- fixed: plugin did only process first sectionList; thanks to Alex Chartier for reporting
0.3 [2012-06-22]:
- fixed: ‘Warning: Missing argument 4 for plgContentSectionList::onContentAfterDisplay()’ in media manager
- added: multi-language-capability; included languages: de-DE and en-GB
- changed: license is now GNU/GPLv3
0.2 [2012-06-01]:
- initial release for Joomla! 2.5
0.1 [2010-10-26]:
- initial release for Joomla! 1.5
- final release for Joomla! 1.5
With php7.0 I got a warning that it would not be compatible?
can you please send me the exact PHP version you’re using and the text of the warning?
can you fix the $show_startcat
if ($categories = $db->loadObjectList()) {
foreach ($categories as $category) {
if($category->id == $categoryId && !$show_startcat) {
continue;
}
thanks for the bug report!
“Show start category” as introduced with sectionList 0.2 should trigger the option to “Show title of starting category” which seems to be broken since 0.10.
Your code snippet not only surpresses the title of the starting category, but also skips the output of all articles belonging to that category. This can be achieved without code modification by adding the id of the starting category to the “Ignore categories” field.
Great plugin!
Just wanted to report that after your last submit, the version from Mar 3rd, 2016, we’ve faced an issue with all generated links. Digging into the code, we found that probably you need to change (fix) lines 138-142 from sectionlist.php to:
>>>>>>>>>>>>>>>>>
$slug = ($item->alias) ? ($item->id . ‘:’ . $item->alias) : $item->id;
$catslug = ($item->category_alias) ? ($item->catid . ‘:’ . $item->category_alias) : $item->catid;
$route = ContentHelperRoute::getArticleRoute($slug, $catslug, $item->language_title);
$url = JRoute::_($route);
<<<<<<<<<<<<<<<<category_id wasn’t found in the SELECT statement, we’ve used $item->catid instead. The same happened to $item->category_alias but since it is not in the SELECT at all, we left it that way.
The last thing is the advice from the description of ContentHelperRoute::getArticleRoute() reoutine that you should pass the third (language) parameter. Se we did.
Just wanted to share,
Thanks again for the plugin,
Best regards,
MM
The notifications have been fixed in 0.10.1 (including $item->category_alias). The last parameter of getArticleRoute() should be $item->language instead of $item->language_title.
Here is your plugin in action
https://www.slova.bg/index.php/audio-records/author/bulgarian-authors/5-ivan-vazov
Best Regards,
MM
Multiple columns would be really appreciated (recommended).
Best regards,
Wilco
couple of suggestions for gaps in requirements…
enable it to be placed in a module - currently in content only
enable published/unpublished articles - currently UNpublished shows in list
enable user rights check - currently registered article shows in list
add option to count items in categories and children
add option to show empty categories
add option to use article title or alias
add option to skip some categories
I think you would have a solid product if these additions became available.
Change line 58:
$now = $date->toMySQL();
to
$now = $date->toSQL();
If this really does the trick, I’ll offer a Jommla 3+ release asap.The plugin now works with Joomla! 3.xWould be cool if you could try and leave a feedback.
Plugin is enabled.
Main category IS is 107, which contains 2 sub-categories, each with an article
I add menu item to a new single article, which says:
A selection of interviews:
{sectionlist 107}
Please select an interview from the list.
And it displays on the front end only:
A selection of interviews:
Please select an interview from the list.
Please double check the plugin is active and all settings are set correctly. From what you typed, it should work.
I can’t believe this feature isn’t in the Joomla core. The default way of handling a Category list with sub-categories is ridiculous.
Your plugin is great!
Why not propose link to sub-category in the list ?
best regards
Suggestion: to the sort order list add “by order” so that it lists according to published order.
I think a feature you might like to consider for future development would be the ability to change the ordering by rank/hits/votes/thumbs up-down.
Thanks for the contribution though!
Cheers!
——————————–
October
[link]sectList is a great plugin to spice up your joomla site[link]
October 2, 2012
[link]Developer searches far and near for the perfect plugin for their site[link]
October 1, 2012
——————————-
Thoughts?
Thanks so much!
Now my wishlist and my suggestions:
1. I want a merger of 2 plugins. First is your “Plugin Sectionlist” and second is “Plugin Include Component”.
Link to this 2nd component is this:
http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/embed-a-include/8741
2. This 2nd plugin creates perfect Lists in an articles (exactly the Joomla core lists, with all the options of table, number of articles, pagination, ordering etc). The code is simple {component url=’’ }
3. I used this 2nd Plugin in one article, and made several lists of one Category + Sub Categories + Sub Sub Categories …..
Then at top, I make the list of all these Categories+Subcategories and hyperlinked them.
As result, I got something very much closer and similar to Sectionex.
Negative thing is this that I had to do it all “Manually”. Moreover, whenever I have to add any “subcategory” then I have to edit the content too and add it there too.
4. Now I want a merger of your “plugin sectionlist” and this “plugin include component”, so that all the things are done automatically and end result is like “Sectionex” (or even better as Sectionex was unable to handle pagination).
Dear,
I am total layperson has no idea of programming. Therefore, I request you to design this Perfect extension for us, which is simply better than any other existing extension in this arena.
Another Idea:
**************
There is already a Menu “List Category” option in Joomla Core.
It shows all the Articles in One Parent Category and all it’s sub-categories. And at bottom, it shows the List of this Parent Category with sub-categories.
This Core Menu option in Joomla is already very much closer to Sectionex. If 2 modifications are done, then it will become perfect (or better) replacement of Sectionex.
1st Change:
The “List” of parent category + subcategories is showed at bottom. That should appear at top of page (just like sectionex). This is not a difficult task and there is already a discussion about it how to achieve this task.
http://forum.joomla.org/viewtopic.php?f=615&t=726155
2nd Change:
The default Joomla “Category List” gives the option of “Ordering” the articles according to “Subcategories”. But problem is this that it does not gives the “Heading” for sub-categories, so that it could be differentiated by articles of next coming sub-category.
If you could include this “Heading” of sub-categories in it, then it will become totally like Sectionex (or even better).
Therefore, we need not to reinvent the wheel.
Once again, I am total layperson. I have only the Ideas and don’t know if it is possible to do it or not. But let’s hope for the best.
Thanks and Regards.
I’ll see what is possible, but don’t hold your breath.
Cheers.
If you have any ideas for improvements, let me know.