Skip to main content

Theme Objects Reference

This comprehensive guide covers all theme objects, variables, and data structures available in Aikeedo themes. Each object provides specific functionality and data access for building dynamic theme components.

Global Objects and Variables

These objects and variables are available globally throughout all theme templates:
  • version - App version information
  • theme - Current theme name
  • environment - Current environment
  • nav - Navigation registry
  • view_namespace - Current view namespace
  • config - All configuration settings
  • currency - Global currency information
  • locales - Available locales array
  • locale - Current locale object
  • option - All option settings

User-Specific Objects

These objects are only available when a user is logged in:
  • user - Current user object with workspace information
  • workspace - Current user’s workspace object

Nested Objects

These objects are available as properties of other objects:
  • address - Available as workspace.address
  • affiliate - Available as user.affiliate
  • country - Available as user.country
  • subscription - Available as workspace.subscription
  • plan_snapshot - Available as subscription.plan

User Object

The user object is a fundamental component in Aikeedo themes, providing access to essential user information when a user is logged into their account. This object is globally accessible, allowing you to easily incorporate user-specific data and functionality into your theme. The user object is available globally when a user is logged in. If no user is logged in, the object will be undefined. Always check for the existence of the user object before attempting to access its properties.
It’s a good practice to use conditional checks when working with the user object to ensure your theme functions correctly for both logged-in and guest users.
user
User Object

Affiliate Object

The affiliate object provides access to essential affiliate information for users participating in the affiliate program. This object is part of the user object and contains details about the user’s affiliate status, earnings, and payout preferences. The affiliate object is always available as a property of the user object when a user is logged in. Affiliate accounts are automatically generated for each user, so you can safely access user.affiliate properties without additional checks for its existence.
affiliate
Affiliate Object

Country Object

The country object provides access to country information for users. This object contains details about the user’s country including name, codes, and flag information. The country object is available as a property of the user object. It may be null if the user’s country is not set.
country
Country Object

Currency Object

The currency object provides access to currency information used throughout the system. This object is used to represent various currencies and their properties. The currency object is globally available and represents the global currency set in the billing settings. It can be accessed in other contexts where currency information is needed, such as in affiliate.currency or subscription.currency.
currency
Currency Object

Environment Variable

The environment variable is used to determine the current execution environment in Aikeedo themes. This is important for making environment-specific decisions in your theme logic. The environment variable is available globally throughout the theme.
environment
string
required
The current environment value. This is the same as the ENVIRONMENT value set in the /.env file.

Locale Object

The locale object provides access to language and region information used throughout the system. This object is used to represent various locales and their properties. The locale object is available in various contexts throughout the Aikeedo system where language and region information is relevant. It can be accessed in theme templates and components to display localized content, format dates and numbers, or adapt the user interface to specific cultural preferences.
locale
Locale Object

Locales Array

The locales array provides access to all available language and region configurations in the system. This array contains multiple Locale objects, each representing a specific language-region combination. The locales array is globally available throughout the Aikeedo system. It can be accessed in theme templates, components, and other contexts where information about all supported languages is needed. This array is particularly useful for implementing language selection features or displaying available language options to users.
locales
array<Locale>
required
The array of locales available in the system. Each element is a Locale object.

Plan Object

The Plan object represents a subscription plan in Aikeedo themes, providing access to essential plan information. This object is part of the plans array, which is globally accessible, allowing you to easily incorporate plan-specific data and functionality into your theme. The Plan objects are available globally as part of the plans array. You can iterate through this array to access individual plan objects and their properties.
It’s a good practice to check if the plans array exists and has elements before attempting to access individual plan objects.
plan
Plan Object

Plan Snapshot Object

The plan_snapshot object represents a snapshot of a subscription plan at the time of subscription creation. This object is used in subscriptions to maintain the plan details even if the original plan is modified. The plan_snapshot object is available as a property of the subscription object.
plan_snapshot
Plan Snapshot Object

Plan Config Object

The plan-config object contains configuration settings for different AI models, tools, and features available in a specific plan. It defines which capabilities are enabled and which models are accessible. The plan-config object is available as a property of the plan object. It can be accessed within theme templates when working with plan-related data.
plan-config
Plan Config Object

Subscription Object

The subscription object provides access to subscription information for a workspace or user. This object contains details about the subscription status, usage, and related information. The subscription object is available within the workspace or user.workspace objects.
subscription
Subscription Object

User Object

The user object is a fundamental component in Aikeedo themes, providing access to essential user information when a user is logged into their account. This object is globally accessible, allowing you to easily incorporate user-specific data and functionality into your theme. The user object is available globally when a user is logged in. If no user is logged in, the object will be undefined. Always check for the existence of the user object before attempting to access its properties.
It’s a good practice to use conditional checks when working with the user object to ensure your theme functions correctly for both logged-in and guest users.
user
User Object

Version Variable

The version variable provides access to the currently installed version of the Aikeedo app. This can be useful for version-specific logic or displaying the app version in your theme. The version variable is available globally throughout the theme.
version
string
required
The current version of the Aikeedo app. This value is read from the /VERSION file.

Theme Variable

The theme variable provides access to the current theme name being used. The theme variable is available globally throughout the theme.
theme
string
required
The current theme name (e.g., “heyaikeedo/default”).
The nav variable provides access to the navigation registry for building navigation menus. The nav variable is available globally throughout the theme.
nav
object
required
The navigation registry object for building navigation menus.

View Namespace Variable

The view_namespace variable indicates which namespace the current view belongs to. The view_namespace variable is available globally throughout the theme.
view_namespace
string|null
required
The current view namespace. Possible values are:
  • "app": For application views
  • "admin": For admin views
  • null: For other views

Config Variable

The config variable provides access to all configuration settings. The config variable is available globally throughout the theme.
config
object
required
An object containing all configuration settings from the application.

Option Variable

The option variable provides access to all option settings configured in the admin panel. The option variable is available globally throughout the theme.
option
object
required
An object containing all option settings from the admin panel. This includes site settings, billing options, color schemes, and other customizable options.

Workspace Object

The workspace object is a fundamental component in Aikeedo themes, representing a user’s working environment and associated settings. This object contains crucial information about the workspace, including subscription details, credit usage, and various configuration options. The workspace object is available globally when a user is logged into the app. Additionally, it is always accessible as a property of the user object. Each user has at least one workspace, so you can safely access workspace properties or user.workspace properties without additional checks for their existence.
workspace
Workspace Object

Workspace Invitation Object

The workspace_invitation object represents an invitation to join a workspace in Aikeedo themes. This object contains essential information about the invitation, including its unique identifier, the invited email address, and timestamps. The workspace_invitation object is available in contexts related to workspace management, such as when listing pending invitations or processing invitation responses.
Always check for the existence of the workspace_invitation object before attempting to access its properties to ensure your theme functions correctly in all invitation-related scenarios.
workspace_invitation
Workspace Invitation Object
I