You are viewing an older version of the Consume documentation (1.x). View the latest version (2.x) →
Template Guides

Available Variables

The following methods are available to call in your Twig templates:

craft.consume.getAllClients()

Returns a collection of Client objects.

craft.consume.getAllEnabledClients()

Returns a collection of enabled Client objects.

craft.consume.getAllConfiguredClients()

Returns a collection of configured Client objects.

craft.consume.getClientById(id)

Returns a Client object by its ID.

craft.consume.getClientByHandle(handle)

Returns a Client object by its handle.

craft.consume.fetchData(client, method, uri, options)

Returns data from your client. See Fetching Data for further docs.