Improved the item_links Twig filter to accept details by type