Skip to content

Managing Key‐Value

MammothDevelopper edited this page Sep 19, 2025 · 2 revisions

Managing Key-Value Pairs in a Templating System

Introduction

Key-value pairs allow dynamic data insertion within content. In this templating system, values are accessible using the $value(KEY) syntax, making it easy to reuse predefined data across different templates and nodes.

Creating Key-Value Pairs

Key-value pairs can be created in two ways:

  1. From a Content Item – By clicking on the "Values" option within the content editor.
  2. From a Node – By clicking the "Values" button on a specific node.

Each key-value pair consists of:

  • Key (unique identifier for the value)
  • Value (associated data, e.g., text, numbers, or links)

Accessing Key-Value Pairs

A value is accessible within a content item if:

  1. It is defined directly in that content item.
  2. It exists in one of its parent nodes.

If multiple values share the same key, the one defined in the content takes priority over those in parent nodes.

Example Usage:

<p>Welcome, $value(USERNAME)!</p>
<p>Your current plan: $value(USER_PLAN)</p>

Managing Values

When creating a node or content item, you can define key-value pairs to store reusable data. These values can be used across different parts of your templates for dynamic content rendering.

Conclusion

This system provides an efficient way to manage reusable data through key-value pairs, ensuring flexibility, consistency, and easy updates across a templating structure.

#ValueManagement #KeyValueStore #DynamicContent #TemplatingSystem #WebDevelopment
#ContentManagement #ReusableData #DataStorage #WebsiteCustomization #CMSIntegration

Clone this wiki locally