Skip to content

Parent Data

The Parent Data node returns the data context passed from a parent component. Use it inside nested components, repeater templates, or child pipelines to access the parent's row data.

Configuration

This node has no configuration options. It simply returns whatever the parent component passed as context.

Input

This is a source node -- it has no input port.

Output

Returns the parent context array, which varies depending on how the component is used:

  • Inside a Repeater: The current iteration row from the parent's data source.
  • Inside a Component Ref: The context passed by the parent component.
  • Inside a For Each node: The current item being iterated.
  • Top-level component: An empty array (no parent context exists).

Example output inside a repeater

If the parent repeater is iterating over a list of products:

json
{
  "id": 42,
  "title": "Premium Widget",
  "price": 99.99,
  "category_id": 3
}

How It Works

When the pipeline executor runs, each pipeline has an optional parent context set by the component that invoked it. The Parent Data node simply returns this context directly.

This is the primary mechanism for parent-child data communication in WP-Nexus.

Example Use Cases

Access current row in a repeater template

A repeater displays a list of products. Inside each item, you need to fetch related reviews. The inner pipeline uses:

  1. Parent Data node to get the current product.
  2. Related Items node with foreignKeyField: "product_id" and localField: "id" to fetch reviews for this product.

Build a detail view inside a nested component

A Component Ref passes a user ID as context. Inside the referenced component:

  1. Parent Data node returns { "user_id": 5 }.
  2. Table Query node uses whereField: "user_id", whereValue: "{ {input.user_id}}" to fetch that user's data.

TIP

The Parent Data node is interchangeable with the Context node when used as a source (no incoming edges). The Context node adds form element value merging, which is useful in action pipelines. The Parent Data node returns the raw parent context only.