Please login to access all of the features of the Community Site.

Custom Site Settings

Overview

Ever wanted custom configuration values available to your mobile application that you can access and utilize in your XAML? A Persisted Dataset built from static, hand-authored JSON gives you exactly that — a cached, centralized place to define values like colors, labels, or feature flags, with no Site entity and no Site Attributes involved at all.

If the values you need aren't really "attributes of the site" so much as configuration values for your mobile experience, you don't need an entity or an attribute record to hold them — you can just declare them directly in the dataset. You still get everything that matters from the Rigging Pattern: one place to manage the values, and zero database lookups when a page reads them.

Example Configuration

In the below example, we're configuring Start Gradient Color and End Gradient Color values to access in our mobile content.

1. Build a Persisted Dataset with static JSON

Create a Persisted Dataset (for example, with the key MobileSiteRigging) whose build script is just the literal JSON you want available — no entity command, no attribute lookup, nothing dynamic required:

{
    "site": {
        "StartGradientColor": "#1E90FF",
        "EndGradientColor": "#00BFFF"
    }
}

Because there's no entity being queried, this dataset doesn't need any Lava commands enabled at all — it's just static content, cached exactly as written. Set whatever refresh schedule you like; it mainly matters for how quickly an edit to the dataset itself takes effect.

Tip

This example uses static values for clarity, but the build script isn't limited to that — it can use Lava and entity commands to pull dynamic data from Rock at refresh time. Once the dataset is persisted, that output is just as static as hand-authored JSON, so consuming pages still get zero database hits either way.

2. Update values by editing the dataset directly

When you want to change a color (or add a new value), edit the Persisted Dataset's build script and save — there's no separate attribute-assignment step, no Mobile Application Detail block, and no entity to manage. The dataset is the source of truth.

3. Read the dataset in your Content block

Load the dataset and reference the values the same way you'd reference any other property:

{% assign rigging = 'MobileSiteRigging' | PersistedDataset %}
{% assign StartGradientColor = rigging.site.StartGradientColor %}
{% assign EndGradientColor = rigging.site.EndGradientColor %}

Here's an example of using the Lava variables to create a gradient background:

<Border>     
    <Border.Background>
        <LinearGradientBrush  StartPoint="0,0" EndPoint="1,1">
            <GradientStop Color="{{ StartGradientColor }}" Offset="0"/>
            <GradientStop Color="{{ EndGradientColor }}" Offset="0.53"/>
        </LinearGradientBrush>
    </Border.Background>
    
    <Label Text="Rock"
       TextColor="White"
       FontSize="18"
       FontAttributes="Bold" />
</Border>

Note

Because this dataset holds static JSON rather than entity data, there's no Rock Entity or Lava-on-server setting to enable anywhere in this flow — on the dataset or on the consuming page.

The result:

Values like the gradient colors in this example are just the beginning! A static-JSON dataset works well for any configuration that isn't naturally "an attribute of an entity" — feature flags, labels, thresholds, whatever your mobile experience needs. Once they're routed through a persisted dataset, you get the performance and single-source-of-truth benefits of the Rigging Pattern without having to create or maintain any entity attributes at all.