? Success

User tests: Successful: Unsuccessful:

avatar kevinscheithauer
kevinscheithauer
11 Aug 2016

Pull Request for Issue/PR #6541 .

Summary of Changes

I added a plugin event (called onTagItemListQuery and used by the tags group) in the tags helper so that plugins can modify the tag item query to get additional attributes in the tag items view. I also added the table name to the name attribute in the group by clause to avoid conflicts.

Testing Instructions

  1. Download and install one of the sample plugins I created content plugin for example (there are also some for newsfeeds, contacts and categories)
  2. Create a tag or use an existing one and create a menu item with it
  3. Give a piece of content the plugin adds an attribute for (a regular com_content article in the example plugin) the tag specified in 2.
  4. Navigate to ./components/com_tags/views/tag/tmpl/default_items.php
  5. In the php tag in Line 84 add or change the echo to another attribute (contentattribs in the example plugin)
  6. In the current version this will not work but with my change it will display the attribute when you access the menu item in the front end

If you have any ideas on what to improve, change or what I missed I would very much appreciate that especially since this is my first pull request on a big project like Joomla.

avatar joomla-cms-bot joomla-cms-bot - change - 11 Aug 2016
Category Libraries
avatar kevinscheithauer kevinscheithauer - open - 11 Aug 2016
avatar kevinscheithauer kevinscheithauer - change - 11 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Aug 2016
Labels Added: ?
avatar Bakual
Bakual - comment - 11 Aug 2016

Imho, if we want to allow plugins to alter the database query, it should be done globally and not for each extension individually (eg for com_tags).

avatar brianteeman brianteeman - change - 7 Sep 2016
Status Pending Needs Review
avatar brianteeman
brianteeman - comment - 7 Sep 2016

Setting to needs review


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11555.

avatar rdeutz
rdeutz - comment - 7 Sep 2016

It is the wrong way, to allow manipulating a query on the fly with a plugin event. This will end in a lot of pain on the long run.

Closing this one, thanks all for working on this.

avatar rdeutz rdeutz - change - 7 Sep 2016
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2016-09-07 08:28:40
Closed_By rdeutz
avatar rdeutz rdeutz - close - 7 Sep 2016

Add a Comment

Login with GitHub to post a comment