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

- Name
- Ben Sewards
- @BenjaminSewards
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.
The Problem With Droplink Parameters
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:
- It expands everything. That's what broke the column splitter in 2025:
GridParametersbecame{ Class: { value } }and the markup renderedclass="row component column-splitter [object Object]". - 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:
| Source | What it says |
|---|---|
| Fishtank, 2024 | The config patch. Warns it "can drastically increase the size of the Layout JSON" |
| dev.to, 2025 | On 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 post | GridParameters 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 aTest Tag 1option item whose only field isTitle) and a CheckboxshowCardImages. - Instances 2 and 3 have
GridParametersset to the stock SXA 12-column grid item andFieldNamesset to theDefaultvariant.
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.parsedefensiveness 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.
GridParameterspoints at a grid item, so it expanded.sidpoints at the partial design item, so it expanded too.FieldNamesdidn't, thanks to the stock exclude list.
Here are all three states side by side:
| Parameter | Setting off (default) | Setting on, no exclusions | Setting 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, DynamicPlaceholderId | strings | strings | strings |
| Live layout size (test page) | 7,261 chars | 7,471 chars | 7,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 uniquehint. 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/. Withhttps, 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:
| Parameter | SXA item template | Fields | Unwrapped by the SDK? |
|---|---|---|---|
Styles | Style | IsVerifiedStyle, Value, Allowed Renderings, Icon | Yes (single style) |
GridParameters | grid Class | NonNumeric, Class, Icon, Tooltip | No, 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.
Reading Your Own Droplink Parameter
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:
- Rename the option item
Test Tag 1toTest Tag 1 renamed. Preview shows the new title immediately, because Preview is CM-assembled. - Publish only the option item. Polling live every 15 seconds for more than 3 minutes: still
Test Tag 1. - Publish only the page. Live showed
Test Tag 1 renamedwithin 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
Valuemeans 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 theValuedeliberately.
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 forGridParameters,Styles,CSSStylesandsid, each<field>with a uniquehint - Verify the merged list in
showconfig.aspxafter deploying - Republish the site after enabling it in each environment
- Give option items a
Valuefield and treat values as stable codes - Read Droplinks through one helper with a default; no
JSON.parse, no[object Object] - Changing an option's
Valuemeans republishing the pages that use it