Published on

Expand your Rendering Parameters in SitecoreAI App Router with Edge Runtime Mode without breaking SXA Components

Authors

A Droplink rendering parameter is the friendliest way to give authors a fixed set of choices: alignment, theme, media position. Each choice is an item with a Value field, the author picks one in Pages, and the front end reads the selected Value. The catch is that, out of the box, the front end doesn't get the item. It gets a GUID.

Back in February 2025 I wrote about the Detailed Rendering Parameters flag breaking SXA's column splitter, and closed with a promise: "There may still be other ways to choose which Rendering Parameters get expanded… I'll report back with any further findings." This is that report!

Verified on SitecoreAI with Experience Edge in Edge runtime mode, Sitecore Content SDK 2.5.1 (Next.js 16 App Router), and the CM's Sitecore.XmCloud.LayoutService 1.12.21.

By default, the Layout Service serializes rendering parameters as raw strings. A Droplink parameter called sampleTag arrives like this:

"params": {
  "showCardImages": "1",
  "sampleTag": "{A1B2C3D4-0000-4000-8000-000000000001}",
  "FieldNames": "Default"
}

A GUID isn't something a component can style with, and resolving it means another query per parameter. The setting LayoutService.DetailedRenderingParams (default false) is supposed to fix this by expanding reference-type parameters into the linked item's fields. Two things kept me from just turning it on:

  1. It expands everything. That's what broke the column splitter in 2025: GridParameters became { Class: { value } } and the markup rendered class="row component column-splitter [object Object]".
  2. Will it even reach the live site? In Edge runtime mode, Pages Preview is assembled by the CM, while live Delivery comes from Experience Edge. Some CM-side customisations work beautifully in Pages and silently do nothing on live. Rendering Contents Resolvers are the textbook example. A Layout Service setting smells like the same category.

No Docs, So Let's Read the DLL

I couldn't find a single Sitecore documentation page that names LayoutService.DetailedRenderingParams. The Experience Edge limitations page only talks about snapshot publishing. The community has the rest:

SourceWhat it says
Fishtank, 2024The config patch. Warns it "can drastically increase the size of the Layout JSON"
dev.to, 2025On XM Cloud, Edge shows the expanded fields, but the item's ID, name and path are gone, and it's on for all rendering parameters
My 2025 postGridParameters became an object; fixed in every component with a helper

"On for all rendering parameters" is the claim worth testing. My instincts said a setting this old had to have some escape hatch, so let's go to the source. The SitecoreAI authoring project already references the Sitecore.XmCloud.LayoutService NuGet package, so the DLL is sitting in the local NuGet cache. No decompiler needed to start; PowerShell can read the string table:

$dll = "$env:USERPROFILE\.nuget\packages\sitecore.xmcloud.layoutservice\1.12.21\lib\net48\Sitecore.LayoutService.dll"
$bytes = [IO.File]::ReadAllBytes($dll)
# .NET user strings are UTF-16; type and member names are ASCII
[regex]::Matches([Text.Encoding]::Unicode.GetString($bytes), '[\x20-\x7e]{0,60}DetailedRendering[\x20-\x7e]{0,60}') | % Value
[regex]::Matches([Text.Encoding]::ASCII.GetString($bytes), '[\x20-\x7e]{0,40}(Detailed|RenderingParam)[\x20-\x7e]{0,40}') | % Value | Sort-Object -Unique
LayoutService.DetailedRenderingParams
get_DetailedRenderingParams
GetJsonRendererDetailed
SerializeRenderingParams

GetJsonRendererDetailed is the class to look at. A reflection-only load lists its methods without running anything:

$asm = [Reflection.Assembly]::ReflectionOnlyLoadFrom($dll)
$flags = [Reflection.BindingFlags]'Public,NonPublic,Instance,Static,DeclaredOnly'
$asm.GetType('Sitecore.LayoutService.Pipelines.GetRenderer.GetJsonRendererDetailed').GetMethods($flags) | % Name
get_DetailedRenderingParams
set_DetailedRenderingParams
Process
AddExcludedField          // (string name)
SerializeRenderingParams
SkipExpand                // (string parameterName) : bool
ResolveMedia
ResolveItem
...

AddExcludedField(string) is the classic shape of a Sitecore config list hook (hint="list:AddExcludedField"), and SkipExpand(string parameterName) is what consults it. The DLL also carries a GUID-matching regex literal, which hints that expansion is decided by whether a parameter's value looks like an item ID, not by the field type on the parameters template. Hold that thought.

Now let's see what the CM actually has configured. On SitecoreAI you can read the effective config through /sitecore/admin/showconfig.aspx, or with Sitecore PowerShell Extensions:

$cfg = [Sitecore.Configuration.Factory]::GetConfiguration()
$cfg.SelectSingleNode("//mvc.getRenderer/processor[contains(@type,'GetJsonRendererDetailed')]").OuterXml
<processor type="Sitecore.LayoutService.Pipelines.GetRenderer.GetJsonRendererDetailed, Sitecore.LayoutService"
           resolve="true" patch:source="sitecore.layoutservice.config">
  <exclude hint="list:AddExcludedField">
    <field>FieldNames</field>
    <field>NavigationRoot</field>
  </exclude>
</processor>

There it is. Sitecore's own sitecore.layoutservice.config already uses an exclude list to stop FieldNames, the rendering variant parameter, from being expanded. It isn't documented anywhere I could find, and nothing stops us from adding to it.

Before and After: Preview vs Edge

To see what the setting really does, I used a test page with three instances of a sample DatasourceWithChildren rendering:

  • Instance 1 has the Droplink sampleTag (pointing at a Test Tag 1 option item whose only field is Title) and a Checkbox showCardImages.
  • Instances 2 and 3 have GridParameters set to the stock SXA 12-column grid item and FieldNames set to the Default variant.

The header's PartialDesignDynamicPlaceholder (which carries sid and sig) comes along for free. Preview was captured with a layout query against the preview endpoint, and live through client.getPage() in the head app pointed at the live context ID. With the setting turned on and no exclusions, after republishing the page, this is what came back:

// trimmed to each rendering's params; identical on Preview and live
"PartialDesignDynamicPlaceholder": {
  "sid": { "Base Partial Design": null, "Signature": { "value": "header-partial-design" } },
  "ph": "headless-header",
  "sig": "sxa-header-partial-design"
},
"DatasourceWithChildren (instance 1)": {
  "showCardImages": "1",
  "sampleTag": { "Title": { "value": "Test Tag 1" } },
  "FieldNames": "Default"
},
"DatasourceWithChildren (instance 2)": {
  "showCardImages": "1",
  "GridParameters": {
    "NonNumeric": { "value": false },
    "Class": { "value": "col-12" },
    "Icon": { "value": "" },
    "Tooltip": { "value": "" }
  },
  "FieldNames": "Default"
}

A few things jump out:

  • It reached live Edge. Preview and live returned identical params, so the CM setting is honoured in Edge runtime mode. More on the republish part below.
  • It's a real JSON object, not a JSON string. No JSON.parse defensiveness needed, unlike what my 2025 helper guarded against.
  • Only the linked item's own fields come through. No ID, no name, no path. If the front end needs a key, the option item must carry it as a field.
  • Expansion is by value. GridParameters points at a grid item, so it expanded. sid points at the partial design item, so it expanded too. FieldNames didn't, thanks to the stock exclude list.

Here are all three states side by side:

ParameterSetting off (default)Setting on, no exclusionsSetting on + exclusions
sampleTag (Droplink)"{GUID}"{ "Title": { "value": "Test Tag 1" } }{ "Title": { "value": "Test Tag 1" } }
showCardImages (Checkbox)"1""1""1"
FieldNames (variant)"Default""Default""Default"
GridParameters"col-12"{ …, "Class": { "value": "col-12" }, … }"col-12"
sid"{GUID}"{ "Base Partial Design": null, "Signature": {…} }"{GUID}"
sig, DynamicPlaceholderIdstringsstringsstrings
Live layout size (test page)7,261 chars7,471 chars7,253 chars

Note that GridParameters and FieldNames are stored as GUIDs too, but they already arrive as "col-12" and "Default" with the setting off. SXA's own Layout Service extensions resolve them. The setting replaces that friendly string with the raw item.

One trap while capturing: a live Edge response still says "databaseName": "master", so don't use that field to tell live from preview. context.variantId only shows up on live, and so does the stand-in item with an ID of all ones (11111111111111111111111111111111) that a ComponentQuery rendering with no datasource gets (preview returns null).

The Fix: Extend the Exclude List

One patch file in the SitecoreAI authoring project turns the setting on and keeps the SXA parameters as strings:

<?xml version="1.0"?>
<!-- authoring/platform/App_Config/Include/zzz/DetailedRenderingParams.config -->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <settings>
      <setting name="LayoutService.DetailedRenderingParams"><patch:attribute name="value">true</patch:attribute></setting>
    </settings>
    <pipelines>
      <mvc.getRenderer>
        <processor type="Sitecore.LayoutService.Pipelines.GetRenderer.GetJsonRendererDetailed, Sitecore.LayoutService">
          <exclude hint="list:AddExcludedField">
            <!-- unique hints so each <field> is added, not merged into a stock <field> -->
            <field hint="gridparameters">GridParameters</field>
            <field hint="styles">Styles</field>
            <field hint="cssstyles">CSSStyles</field>
            <field hint="sid">sid</field>
          </exclude>
        </processor>
      </mvc.getRenderer>
    </pipelines>
  </sitecore>
</configuration>

Add <Content Include="App_Config\Include\zzz\DetailedRenderingParams.config" /> to Platform.csproj and it ships with the next deployment. A few details matter:

  • Give every <field> a unique hint. Sitecore's config patcher matches elements by name and attributes. A bare <field>GridParameters</field> looks exactly like the stock <field>FieldNames</field> and risks being merged into it instead of added. With hints, the merged result on the CM is exactly what we want:

    <exclude hint="list:AddExcludedField" patch:source="DetailedRenderingParams.config">
      <field>FieldNames</field>
      <field>NavigationRoot</field>
      <field hint="gridparameters" patch:source="DetailedRenderingParams.config">GridParameters</field>
      <field hint="styles" patch:source="DetailedRenderingParams.config">Styles</field>
      <field hint="cssstyles" patch:source="DetailedRenderingParams.config">CSSStyles</field>
      <field hint="sid" patch:source="DetailedRenderingParams.config">sid</field>
    </exclude>
    
  • The patch namespace is http://www.sitecore.net/xmlconfig/. With https, Sitecore silently ignores the patch.

  • sid: nothing in the head app or the SDK reads it, but keeping it a GUID costs nothing and keeps a partial design object out of every page's layout.

  • The list is by parameter name. If another SXA or platform parameter stores an item ID and needs to stay a string, it goes on the list.

After deploying and republishing, sampleTag stays expanded, while GridParameters is "col-12" and sid is a GUID again, on Preview and live. The live layout ended up 8 characters bigger than before the setting, so Fishtank's size warning doesn't apply when only the parameters you deliberately made Droplinks grow.

Why the SDK Only Half-Handles It

Here's the part that surprised me. The Content SDK actually knows about detailed rendering parameters. getSXAParams builds the params.styles string every rendering receives:

// @sitecore-content-sdk/react 2.5.0, components/Placeholder/placeholder-utils.js
export const getSXAParams = (rendering) => {
  if (!rendering.params) return { styles: '' };
  const gridParameters = getRenderingParamString(rendering.params.GridParameters) ?? '';
  const styles = getRenderingParamString(rendering.params.Styles) ?? '';
  const combinedStyles = [gridParameters, styles].filter(Boolean).join(' ');
  if (!combinedStyles) return undefined;
  return { styles: combinedStyles };
};

And getRenderingParamString (in @sitecore-content-sdk/content 2.4.0) is documented as normalizing "DetailedRenderingParams as objects instead of plain strings (e.g. Styles, CSSStyles, GridParameters)". It unwraps { Value: { value } } or { value }. So I checked the item templates behind each parameter:

ParameterSXA item templateFieldsUnwrapped by the SDK?
StylesStyleIsVerifiedStyle, Value, Allowed Renderings, IconYes (single style)
GridParametersgrid ClassNonNumeric, Class, Icon, TooltipNo, there's no Value field

So with the setting on and no exclusions, getRenderingParamString returns undefined for the grid, the column class falls out of params.styles, and every container, splitter or component that puts params.styles on its wrapper loses its width. In 2025 the failure printed [object Object]. Now it prints nothing, which is arguably worse, because nothing in the DOM looks broken. The exclude list sidesteps all of it.

getRenderingParamString does exactly the right thing for an option item with a Value field, but it's marked @internal and lives in @sitecore-content-sdk/content, a transitive dependency of @sitecore-content-sdk/nextjs rather than a direct one. Don't import it. The SDK's ComponentParams type also says every parameter is a string, which is no longer true. A small shared helper covers both:

// src/lib/rendering-params.ts
/**
 * Reads the selected option's Value from a Droplink rendering parameter.
 * - Expanded (setting on, page republished): { Value: { value: "left" } } -> "left"
 * - Not expanded yet (page published before the setting): a GUID string -> undefined
 */
export const getDroplinkValue = (param: unknown): string | undefined => {
  if (param && typeof param === 'object' && 'Value' in param) {
    const value = (param as { Value?: { value?: unknown } }).Value?.value;
    return typeof value === 'string' ? value : undefined;
  }
  return undefined;
};
// in a rendering
const ALIGNMENTS = { left: 'text-left', center: 'text-center', right: 'text-right' } as const;

const alignment = getDroplinkValue(params?.alignment) as keyof typeof ALIGNMENTS | undefined;
const alignmentClass = ALIGNMENTS[alignment ?? 'left'] ?? ALIGNMENTS.left;

Map the value through a lookup with a default, and never interpolate it straight into a class name. Name the option field Value: it matches SXA's own Style items, and it keeps the helper this small.

Republish the Page, Not the Option

Right after deploying the config, live Edge kept returning the GUID. Only a republish of the page itself brought the expanded object through. That made me suspicious about where the value lives, so let's test it:

  1. Rename the option item Test Tag 1 to Test Tag 1 renamed. Preview shows the new title immediately, because Preview is CM-assembled.
  2. Publish only the option item. Polling live every 15 seconds for more than 3 minutes: still Test Tag 1.
  3. Publish only the page. Live showed Test Tag 1 renamed within about 30 seconds.

The expanded value is stored with the page's published layout, not looked up at request time. That has two practical consequences:

  • Rolling it out: in each environment, deploy the patch and then republish the site. Until a page is republished, live serves the GUID, which is why the helper above falls back to a default.
  • Changing an option's Value means republishing every page that uses it. Treat option values as stable codes, which they usually are, since CSS keys off them. Change the display name freely; change the Value deliberately.

This lines up with the general rule on the Experience Edge limitations page: if you change a rendering configuration or Layout Service extension that affects Layout Service output, you must republish the affected items.

NOTE

Not tested here: Droptree and General Link parameters, media references (the DLL has a ResolveMedia), Styles or GridParameters holding several IDs (one grid size per breakpoint), and languages other than English. Excluding the SXA parameters means you don't have to find out the hard way.

In Summary

The setting isn't all or nothing. GetJsonRendererDetailed has an exclude list, Sitecore already uses it for rendering variants, and you can extend it. Expand your own Droplinks, keep SXA's strings, and remember that the expanded value travels with the page:

  • Patch: LayoutService.DetailedRenderingParams = true, plus excludes for GridParameters, Styles, CSSStyles and sid, each <field> with a unique hint
  • Verify the merged list in showconfig.aspx after deploying
  • Republish the site after enabling it in each environment
  • Give option items a Value field and treat values as stable codes
  • Read Droplinks through one helper with a default; no JSON.parse, no [object Object]
  • Changing an option's Value means republishing the pages that use it