Closed aelvan closed 10 years ago
Want to make a pull request? :) Seems like the fix is something like:
$show_categories = ee()->TMPL->fetch_param('show_categories') === 'yes';
And then simply use if ($show_categories)
in subsequent conditionals. I'm not sure why it would evaluate as empty in the first place, but it seems easily solvable.
Wish I knew how to do that, I'm a git noob. ;)
And yeah, that fix is exactly what I did.
No worries. Thanks for the bug report and the clear solution. This will be fixed in the next release.
Adding show_categories="yes" to my exp:json:entries tag didn't work. I dug into the code and found out that this conditional around line 235 never was true:
if (ee()->TMPL->fetch_param('show_categories') === 'yes')
It works in the fist case, around line 190, but after that it's just empty. I solved this by storing the value of the fetch_param in a variable and using that in the conditionals instead.
Using EE 2.7.3 and JSON 1.1.2.