Update the path when a non leaf item is clicked.