handle global attribute in shortcode