diff --git a/aidlc-docs/features/hero-module/assumptions-and-open-questions.md b/aidlc-docs/features/hero-module/assumptions-and-open-questions.md
index a8a461c..e42dbfb 100644
--- a/aidlc-docs/features/hero-module/assumptions-and-open-questions.md
+++ b/aidlc-docs/features/hero-module/assumptions-and-open-questions.md
@@ -26,3 +26,5 @@ Kept while Bryan was away (2026-11-16): no questions to him, a likely assumption
| 20 | **ASF production** hosting (IIS, MijnHostingPartner): can the application pool write a data directory, and is it backed up? | Unknown; Bryan tests with ASF. The storage sits behind `IMediaStore` so a database store can follow. | Build the database store (2 to 3 days). | `IMediaStore`, `FileSystemMediaStore` |
| 21 | **SLS title** on the page. | The CMS delivers one title with line breaks; the SLP site derives the screen-reader title from the lines and adds the brand prefix itself. | Another split (a separate `heading` field) would be a model change. | `HeroSaveRequest.Title`, `HeroPictureRenderer` (` `), SLS site |
| 22 | **Production seed**. | Not done; only the test hosts, with Bryan's password, after his go. | n/a | `scripts/Seed-Hero.ps1`, `docs/release-checklist-productie.md` section 4b |
+| 23 | What does the host write for a hero **without any slide** (SLP Software)? | A text-only region in the first HTML (so a CMS change is visible without JavaScript, LCP is the text): `h1.cms-hero-title` with an optional `span.cms-hero-tagline` and `span.cms-hero-title-lines` (title lines separated by ` `, no brand prefix), then `p.cms-hero-lead` (lead, line breaks as ` `) and `p.cms-hero-buttons` with `a.cms-hero-button`. Nothing to preload, and the preload region is left as built. A hero WITH slides but none usable stays empty (ASF unchanged). If the ASF CMS hero ever has no slides at all, ASF would get this text region instead of its baked hero. | A flag per site, or text-only only when the markers say so (for instance `CMS:HERO-TEXT`). | `HeroPictureRenderer.Render` and `TextOnlyRegion`, `HeroHtmlTransform.ApplyAsync`, `HeroTextOnlyTests` |
+| 24 | Does the data block carry the hero when it has no slides? | Yes (intended): the site reads the hero from the data block, the baked block is `{}`. | n/a | `HeroPageModel`, `HeroDataContributor` |
diff --git a/aidlc-docs/features/hero-module/inception/requirements/site-contract-agreed-with-asf.md b/aidlc-docs/features/hero-module/inception/requirements/site-contract-agreed-with-asf.md
index 7dd9c3d..3545b7e 100644
--- a/aidlc-docs/features/hero-module/inception/requirements/site-contract-agreed-with-asf.md
+++ b/aidlc-docs/features/hero-module/inception/requirements/site-contract-agreed-with-asf.md
@@ -72,3 +72,9 @@ Folder `web/contract/host-injection/hero/` (README with all rules, `seed.json`,
7. Seed (first focus estimates by looking at the photos, (x,y) from the top left): hero-8 (0.50,0.55), hero-7 (0.45,0.50), hero-1 (0.55,0.60), hero-2 (0.45,0.45), hero-3 (0.45,0.40), hero-4 (0.45,0.35), hero-5 (0.50,0.55), hero-6 (0.50,0.35). Bryan adjusts them in the admin.
Not yet built on the ASF side (after this design): hydration and slider from the data block, marker injection in the build, e2e against a stand-in host, the baked fallback from the CMS-driven format.
+
+## Text-only hero (SLP Software), added 2026-11-16
+
+A hero **without any slide** is written as text (SLP Software has no images; the site reads the same hero from the data block):
+
+`
");
+ }
+
+ [Fact]
+ public void TheLead_KeepsItsLineBreaks_AndEverythingIsEncoded()
+ {
+ var injection = HeroPictureRenderer.Render(TextOnly("x", null, "a & b\nc \"d\"", new HeroButtonDto("", "/p?a=1&b=2")));
+
+ injection.Region.Should().Contain("<b>x</b>").And.Contain("a & b c "d"").And.Contain("href=\"/p?a=1&b=2\"><i>");
+ injection.Region.Should().NotContain("").And.NotContain("");
+ }
+
+ [Fact]
+ public void AHeroWithSlidesThatAreAllUnusable_StaysEmpty_AsForTheAsfSite()
+ {
+ var hero = new PublicHeroDto("single", "Titel", null, null, [], [new PublicSlideDto("x", "", false, new PublicImageDto(1, 1, new FocusDto(0.5, 0.5, 1), "/m.webp", []))]);
+
+ HeroPictureRenderer.Render(hero).IsEmpty.Should().BeTrue();
+ }
+
+ [Fact]
+ public async Task TheTransform_FillsTheTextRegion_AndLeavesThePreloadRegionAlone()
+ {
+ var model = Substitute.For();
+ model.GetAsync(default).ReturnsForAnyArgs(TextOnly());
+ const string page = "baked";
+
+ var html = await new HeroHtmlTransform(model).ApplyAsync(page, new HtmlTransformContext("https://x"), default);
+
+ html.Should().Contain("
").And.NotContain("baked");
+ html.Should().Contain("");
+ }
+}
diff --git a/src/SlpModularCms.Modules.Hero/Services/HeroInjection.cs b/src/SlpModularCms.Modules.Hero/Services/HeroInjection.cs
index c3fa1c1..4b61714 100644
--- a/src/SlpModularCms.Modules.Hero/Services/HeroInjection.cs
+++ b/src/SlpModularCms.Modules.Hero/Services/HeroInjection.cs
@@ -64,7 +64,9 @@ public sealed class HeroHtmlTransform(IHeroPageModel model) : IHtmlPageTransform
}
html = HtmlMarkerEditor.ReplaceRegion(html, HtmlRegion, rendered.Region);
- return HtmlMarkerEditor.ReplaceRegion(html, PreloadRegion, rendered.Preload);
+
+ // A text-only hero has nothing to preload: the page keeps whatever its build put there.
+ return rendered.Preload.Length == 0 ? html : HtmlMarkerEditor.ReplaceRegion(html, PreloadRegion, rendered.Preload);
}
}
diff --git a/src/SlpModularCms.Modules.Hero/Services/HeroPictureRenderer.cs b/src/SlpModularCms.Modules.Hero/Services/HeroPictureRenderer.cs
index 62cc056..22f33cf 100644
--- a/src/SlpModularCms.Modules.Hero/Services/HeroPictureRenderer.cs
+++ b/src/SlpModularCms.Modules.Hero/Services/HeroPictureRenderer.cs
@@ -36,7 +36,14 @@ public static class HeroPictureRenderer
return HeroInjection.None;
}
- var slide = (hero.Slides ?? []).FirstOrDefault(IsUsable);
+ // A hero without any slide is a text-only hero (SLP Software): the region holds the title lines, the lead and
+ // the buttons, and there is nothing to preload. A hero WITH slides of which none is usable stays empty (ASF).
+ if ((hero.Slides ?? []).Count == 0)
+ {
+ return new HeroInjection(TextOnlyRegion(hero), string.Empty);
+ }
+
+ var slide = hero.Slides.FirstOrDefault(IsUsable);
if (slide is null)
{
return HeroInjection.None;
@@ -81,23 +88,54 @@ public static class HeroPictureRenderer
html.Append("").Append(Encode(hero.Tagline)).Append(" ");
}
- html.Append("").Append(string.Join(" ", hero.Title.Replace("\r\n", "\n").Split('\n').Select(Encode))).Append("
");
+ html.Append("").Append(Lines(hero.Title)).Append("");
+ AppendButtons(html, hero);
+ return html.ToString();
+ }
- var buttons = (hero.Buttons ?? []).Where(IsUsable).Take(2).ToList();
- if (buttons.Count > 0)
+ ///
+ /// The text-only hero: h1.cms-hero-title with the tagline (when there is one) and the title lines in
+ /// span.cms-hero-title-lines separated by <br> (no brand prefix: the site adds it to its own
+ /// screen-reader title), then p.cms-hero-lead and the buttons row.
+ ///
+ private static string TextOnlyRegion(PublicHeroDto hero)
+ {
+ var html = new StringBuilder();
+ html.Append("
");
+ if (!string.IsNullOrWhiteSpace(hero.Tagline))
{
- html.Append("