improved the permalink to item details in gallery