Skip to main content

closest

A drop that holds resources of different types that are the closest to the current context

This drop is used to hold resources of different types that are the closest to the current context. These resources can be of type product, collection, article, blog, page, or metaobject. The resources of different types within the closest drop can be:

  • The currently rendered section or theme block resource setting of the same type
  • The currently rendered theme block's ancestor resource setting of the same type
  • The currently rendered template resource of the same type
  • Assigned via {% content_for %} tag

Tip

To learn about how closest drop in theme settings can be used, refer to Dynamic sources.


Properties

Anchor to
article

Closest article resource

The article resource that is the closest to the current context.

Closest blog resource

The blog resource that is the closest to the current context.

Closest collection resource

The collection resource that is the closest to the current context.

Closest metaobject resources

The metaobject resources that are the closest to the current context.

Closest page resource

The page resource that is the closest to the current context.

Closest product resource

The product resource that is the closest to the current context.

Directly accessible in

  • Global
Was this section helpful?