Do not display My favorites in profile if there are no favorites
rares - March 28, 2009 - 00:34
| Project: | Favorite Nodes |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
The current behavior is that My favorites are displayed even if there are no favorites, or if the number of favorites to display is set to 0. The attached patch changes this so that the heading is not displayed unless there is something to display.
Note that I have removed line 145
'#value' => theme('item_list', $items),
because $items does not exist in that context.
| Attachment | Size |
|---|---|
| favorite_nodes.module.patch | 1.26 KB |

#1
#2
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
I had this same issue with the latest version... So went diving into the code and found that the above patch was implemented, but still a empty Favorites with a link to an empty view showed up on user profiile pages.
Found out it was due to the fact that $favorites array was created with content type name and therefor never will be empty.
i have attached a small Hack/patch that fixes it... I'm using it on my site and it works like a charm.