When using the classic page/post editor, several attributes can be passed to the [pgn]...[/pgn]
shortcode to customize how the corresponding chess game is generated. These attributes are presented below.
To be noticed: these attributes correspond to the customization settings proposed in the right panel of the Chess game block for those using the Gutenberg page/post editor. The customization features proposed by RPB Chessboard are the same whichever the page/post editor you are using.
Contents
Game option attributes
Attribute | Admissible values | Description |
---|---|---|
flip=... | true | Whether the navigation board and inner diagrams are presented from Black’s point of view (flip=true ) or from White’s (flip=false ). |
initial_selection=... | start number + w number + b | Position displayed by default on the navigation board: start for the position before the first move, end for the position after the last move, or a move number + w or b for the position after the corresponding move (for example: 1w for the position after the 1st white move, 12b for the position after the 12th black move…). |
Piece symbol attribute
Attribute | Admissible values | Description |
---|---|---|
piece_symbols=... | native 6 comma-separated A-Z characters | Piece symbols used to display the moves. |
Attribute | Admissible values | Description |
---|---|---|
navigation_board=... | none | Whether the navigation board is visible or not, and if visible, where it is displayed. |
nav_square_size=... nav_show_turn=... | See the corresponding attributes of the [fen]...[/fen] shortcode. | Navigation board size, coordinate, turn flag and theming settings. |
animated=... | true | Whether the moving pieces are animated on the navigation board when the user navigates through the moves of the game. |
show_move_arrow=... | true | Whether a move arrow is displayed or not on the navigation board when the user navigates through the moves of the game. |
move_arrow_color=... | b | Color of the move arrow if displayed (blue, green, red or yellow). |
show_play_button=... | true | Whether the play/pause button is visible or not in the navigation toolbar. |
show_flip_button=... | true | Whether the flip button is visible or not in the navigation toolbar. |
show_download_button=... | true | Whether the download button is visible or not in the navigation toolbar. |
Diagram attributes
Attribute | Admissible values | Description |
---|---|---|
diag_square_size=... diag_show_turn=... | See the corresponding attributes of the [fen]...[/fen] shortcode. | Size, coordinate, turn flag and theming settings of the inner diagrams (those inserted with [#] in text comments). |
Other attributes
Attribute | Admissible values | Description |
---|---|---|
url="..." | URL (see example) | URL pointing at the file containing the PGN data to display (only if the PGN data is defined by a file, instead of by a inlined PGN text). |
game=... | Integer (see example) | Index of the chess game in the file pointed by url="..." to display. Set 0 to display the first game of the file, 1 for the second game of the file, etc… |