share function for detail page