Go to: Synopsis. Return value. MEL examples.

Synopsis

publishAnchorNodes(int $asParent, int $namingConvention, string $customName, string $nodes[], int $publish)

This script can be used to publish nodes as parent or child anchors on their container. The naming convention flag allows you to choose the following names for the published attribute: 0 = used the node name, 1 = prepend the node name to the supplied custom name, 2 = used the custom name. In all cases, an index will be added to the resulting name if it is required to make the name unique. The script can also be used to unpublish nodes.

Return value

None

Arguments

Variable Name Variable Type Description
$asParentintIf 1, publish as parent anchor, else child.
$namingConventionintHow to choose the publish name. See description.
$customNamestringCustom name for $namingConvention 1 and 2
$nodesstring[]Nodes to publish.
$publishintTrue for publish, false for unpublish.

MEL examples

	// publish the selected nodes as parent anchors, with the naming convention
  // of "parent_<nodeName>"
	publishAnchorNodes 1 1 "parent" `ls -sl` 1;