Move collection after target (Beta)

collection.moveAfter(target)

Moves this variable collection so that it appears immediately after target in the Variables panel display order.

The display order controls how collections are listed in the Webflow Designer’s Variables panel. This method does not affect variable values or references.

Beta

These methods are in public beta and may change with future releases.

Syntax

1collection.moveAfter(target: VariableCollection): Promise<null>

Parameters

  • target: VariableCollection — The collection after which this collection should be positioned.

Returns

Promise<null>

A Promise that resolves to null when the reorder is complete.

Example

1const collections = await webflow.getAllVariableCollections();
2
3// Move the last collection to appear after the first
4if (collections.length >= 2) {
5 const [first, ...rest] = collections;
6 const last = rest[rest.length - 1];
7
8 await last.moveAfter(first);
9 console.log('Collection moved');
10}

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canModifyVariablesAnyMainCanvasDesign