<group>

A logical grouping of components

<group> is a General Operator component that collects individual DoenetML components into a single named element.

Attributes and Properties

Attributes for <group>

Other (4)
asList

boolean. Default value: false. Whether to render the group's children separated by commas (true) or with no separator (false).

createComponentOfType

text. Component type to wrap each child as when expanding the group.

numComponents

number. Number of components to create when expanding (used with createComponentOfType).

rendered

boolean. Default value: true. Whether the group's children are rendered.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

Whether this group's children should be treated as responses for assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <group name="g">

Other (1)
$g.rendered

boolean. Whether the group's children are rendered.

Common to all components (3)
$g.doenetML

text. The DoenetML source code that produced this component.

$g.hide

boolean. Whether to hide this component from the rendered output.

$g.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: Grouping points for graphing

A <group> of <point> components is defined in a <setup> block. All of the points can then be rendered on a <graph> at once using a single reference to the name of the <group>, $points.


Example: A <group> of different components

A <group> need not be composed of a single type of element. Objects defined within a <group> can be collectively hidden.