setFunctionHook( 'CategoryByList', [ self::class, 'CategoryByList' ] ); } // Render the output of {{#example:}}. public static function CategoryByList( Parser $parser, $param1 = '', $param2 = '', $param3 = '' ) { // The input parameters are wikitext with templates expanded. // The output should be wikitext too. $output = ""; $categories = explode(', ', $param1); foreach ($categories as $item) { $output .= '[[Categoría:'.$item.']]'; } return $output; } }