diff --git a/includes/VectorTemplate.php b/includes/VectorTemplate.php index 887a9a812..0270b4057 100644 --- a/includes/VectorTemplate.php +++ b/includes/VectorTemplate.php @@ -228,45 +228,39 @@ class VectorTemplate extends BaseTemplate { if ( $msg === null ) { $msg = $name; } - $msgObj = $this->getMsg( $msg ); - $labelId = Sanitizer::escapeIdForAttribute( "p-$name-label" ); - ?> -
- getMsg( $msg ); + + $props = [ + 'portal-id' => "p-$name", + 'html-tooltip' => Linker::tooltip( 'p-' . $name ), + 'msg-label' => $msgObj->exists() ? $msgObj->text() : $msg, + 'msg-label-id' => "p-$name-label", + 'html-userlangattributes' => $this->data['userlangattributes'] ?? '', + 'html-portal-content' => '', + 'html-after-portal' => $this->getAfterPortlet( $name ), + ]; + + if ( is_array( $content ) ) { + $props['html-portal-content'] .= '