Docs Menu

Method and Language Selectors

Method and language selectors let you provide dynamic content based on the selected method and language.

A method and language selector contains the following parts:

  1. Radio boxes with different method options (up to six)

  2. Optional method description

  3. Language selector drop-down (drivers only)

method and language selectors anatomy

The following example shows the syntax for a method selector:

.. method-selector::
.. method-option::
:id: driver
.. method-description::
.. include:: /includes/description-drivers.rst
.. tabs-selector:: drivers

The following example shows the syntax for a language selector:

.. tabs-drivers::
.. tab::
:tabid: compass
.. include:: /includes/steps-gswa-connect-to-cluster-compass.rst
.. tab::
:tabid: csharp
.. include:: /includes/steps-gswa-driver-connect-csharp.rst
.. tab::
:tabid: go
.. include:: /includes/steps-gswa-driver-connect-go.rst
.. tab::
:tabid: java-sync
.. include:: /includes/steps-gswa-driver-connect-java.rst
.. tab::
:tabid: python
.. include:: /includes/steps-gswa-driver-connect.rst
.. tab::
:tabid: nodejs
.. include:: /includes/steps-gswa-driver-connect-node.rst

When you create method and language selectors, use the following guidelines:

  • Add a language selector only when Driver is the selected method.

  • Include a minimum of two options and a maximum of six options per method selector. You may have only one instance of a method selector per page.

    method selector options
    click to enlarge
  • The optional method description may not exceed two lines.

    method selector description
    click to enlarge