? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
31 Dec 2017

Pull Request for Issue # .

Summary of Changes

Currently, we have code to set layout for category view base on active menu item and layout setting from the category itself. The logic is:

  1. If the current active menu item is a direct menu link to the category being displayed, then use the layout from menu item

  2. If the above condition is wrong, then the layout set up for the category will be used

This PR keeps that same logic, but improves the code a bit to have more accurate + easier to read:

  1. It compares component property of active menu item with the component of the view (original code ignore it)

  2. Compare view and id directly instead of using strpos like in the original code

Testing Instructions

  1. Code review can be considered as successful test

  2. For human testing:

  • Create a category, in Options tab, set Layout parameter to Blog.
  • Create a menu item to link to List All Categories menu option. Go to frontend, access to that menu item, all categories will be displayed. Click on the link to the category you created above, check and confirm articles are displayed using Blog layout.
  • Now, create a new menu item to link to Category List menu option, choose the category you created in menu parameter
  • Access to that menu item, check the articles displayed and confirm that it uses List layout (instead of Blog layout like you set for the category when you create it)
avatar joomdonation joomdonation - open - 31 Dec 2017
avatar joomdonation joomdonation - change - 31 Dec 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 Dec 2017
Category Libraries
avatar Quy Quy - test_item - 7 Jan 2018 - Tested successfully
avatar Quy
Quy - comment - 7 Jan 2018

I have tested this item successfully on 04a414b


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

avatar grhcj
grhcj - comment - 26 Jan 2018

I have tested this item successfully on 04a414b


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

avatar grhcj grhcj - test_item - 26 Jan 2018 - Tested successfully
avatar Quy Quy - change - 26 Jan 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 26 Jan 2018

RTC


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

avatar mbabker mbabker - change - 13 Feb 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-02-13 00:05:00
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 13 Feb 2018
avatar mbabker mbabker - merge - 13 Feb 2018

Add a Comment

Login with GitHub to post a comment