OK. Home from work; had dinner with the family; nephews have come and gone; looked at some easy posts and saved the fun one for later! 8)
Yes, I think you are correct in that there is no reason to look at the item params on the blog page. So, I backed up in the logic to see how the item parameters were extracted from the database.
In
com_content/views/category/view.html.php, there is a function called
&getItem. For the category blog, that appears to be how the data for the article and the parameters are assembled in preparation for the
blog_item.php code you are showing.
I saw this section that clones the $params (I assume it already contains the menu item parameters we really want used), and then it merges in the article parameters into the $item->$params you are showing.
So, I left the line that copies the parameters ($item->params = clone($params) ; ) since that is what the code snippet you are showing is depending on. But, I commented out the new two lines that appear to merge in the article parameter values. And, it works the way I would like to see it work.
Give it a try and see what you think. Just comment out the two lines marked "//amy" below in
com_content/views/category/view.html.php.
Code:
// Get the page/component configuration and article parameters
$item->params = clone($params);
//amy $aparams = new JParameter($item->attribs);
// Merge article parameters into the page configuration
//amy $item->params->merge($aparams);
Thanks for working with this,
Amy
