Hide actions if _actions is empty

Added a replace function to check if the list is empty.

Now _actions included a string like '<li></li>' so this was never empty.