Player career widget
Description
The Player career football widget collects information from regional, national, and international tournaments to create detailed profiles of a player’s career.
The widget breaks down player information in tournaments, seasons, and teams, and can segment player stats into Minutes, Matches played, Yellow/red cards, Assists, Team, Championship, and so on.
The Player career widget is an excellent tool for creating player profile pages.
Bind the widget to HTML DOM
Make sure that you have the loader already set up on your website.
If not, follow our guide:
You can bind the widget to the HTML DOM in two ways:
- Bind the widget without initial options. The required attribute here is "data-widgetId"
<div data-widgetId="widget-player-career"></div>
- Bind the widget with initial options. The all available options can be seen below
<div data-widgetId="widget-player-career" data-options='{...}'></div>
- The optional "data-options" attribute:
{
int playerID: 1, // Unique identifier of the resource.
string lang: 'en', // the language in format like: en, bg, ru and etc.
array careerFilters: ["regional", "national", "international"] // List of filters to display.
If no such list is provided it will display all filters.
array statsColumns: [ "played", "cleansheets", "conceded", "minutes", "goals", "assists", "yellowCards", "redCards"] // List of statistics to display.
If no such list is provided it will display all player statistics depending on its position:
- goalkeepers: ['played', 'cleansheets', 'conceded', 'yellowCards', 'redCards']
- other players: ['played', 'minutes', 'goals', 'assists', 'yellowCards', 'redCards'],
array tableColumns: ["season", "team", "tournament"] // List of table columns.
If no such list is provided it will display all columns.
displayTeamShortNamesOnDesktop: (true/false) -> // This option replaces the team name with its short name on all resolutions
displayTeamShortNamesOnMobile: (true/false) -> // This option replaces the team name with its short name on mobile resolutions
}
Player career widget in the CMS
Currently, the Sportal365 CMS offers a variety of football widgets to enable creators to add sports-specific statistics and context to their articles, videos, or galleries.
Adding the Player career widget to blocky
To add a Player career widget to a post (Article, Video, or Gallery):
- Select the + button to open the blocks menu.
- Then, Football widgets-->Player career.
- Once the widget configuration panel opens, enter a player in the Player box.
- Use the Championship filter box to select a championship.
- Select the stats you want to show in the Statistics columns box.
- Next, go to Table columns and select from the options.
Note that except for the Player box, you can select one or several options in all other boxes.
- When done, select Save Block.
Video example
Updated about 2 years ago