Add more control flow conditions to check the wiki page context before setting the portalSpaceLabel to currentSpaceName