CmsContentScaffolding.Shared.Resources
1.3.3
dotnet add package CmsContentScaffolding.Shared.Resources --version 1.3.3
NuGet\Install-Package CmsContentScaffolding.Shared.Resources -Version 1.3.3
<PackageReference Include="CmsContentScaffolding.Shared.Resources" Version="1.3.3" />
<PackageVersion Include="CmsContentScaffolding.Shared.Resources" Version="1.3.3" />
<PackageReference Include="CmsContentScaffolding.Shared.Resources" />
paket add CmsContentScaffolding.Shared.Resources --version 1.3.3
#r "nuget: CmsContentScaffolding.Shared.Resources, 1.3.3"
#:package CmsContentScaffolding.Shared.Resources@1.3.3
#addin nuget:?package=CmsContentScaffolding.Shared.Resources&version=1.3.3
#tool nuget:?package=CmsContentScaffolding.Shared.Resources&version=1.3.3
Optimizely CMS Content Scaffolding Shared Resources
This Nuget package containes shared resources for the Optimizely CMS Content Scaffolding library, such as helper classes and example content builders. The resources in this package are used by the Optimizely CMS Content Scaffolding library and can also be used by developers when building their own content scaffolding builders.
Example
app.UseCmsContentScaffolding( builderOptions: o ⇒ { o.Language = CultureInfo.GetCultureInfo("sr"); o.StartPageType = typeof(StartPage); o.BuildMode = BuildMode.Append; }, builder: b ⇒ { var teaser2Ref = ContentReference.EmptyReference; var teaser3Ref = ContentReference.EmptyReference; var articlePageRef = ContentReference.EmptyReference;
b.UseAssets(ContentReference.SiteBlockFolder)
.WithFolder("Folder 1", l1 =>
{
l1
.WithFolder("Folder 1_1", l2 =>
{
l2.WithBlock<TeaserBlock>("Teaser 1", out teaser2Ref, x =>
{
x.Heading = "Teaser 1 Heading";
x.Text = ResourceHelpers.Faker.Lorem.Paragraph();
x.Image = PropertyHelpers.GetOrAddMedia<ImageFile>("Image 2", ".png", ResourceHelpers.GetImageStream());
});
})
.WithMedia<VideoFile>(x => x.Name = "Test video", ResourceHelpers.GetVideoStream(), ".mp4")
.WithBlock<TeaserBlock>("Teaser 3", out teaser3Ref, x =>
{
x.Heading = "Test";
x.Text = ResourceHelpers.Faker.Lorem.Paragraph();
x.Image = PropertyHelpers.GetOrAddMedia<ImageFile>("Image 2", ".png", ResourceHelpers.GetImageStream());
});
})
.WithContent<ContentFolder>(x => x.Name = "Folder1")
.WithContent<ImageFile>(x => x.Name = "Image 1")
.WithBlock<TeaserBlock>("Teaser 2", x =>
{
x.Heading = "Test";
x.Text = ResourceHelpers.Faker.Lorem.Paragraph();
x.Image = PropertyHelpers.GetOrAddMedia<ImageFile>("Image 2", ".png", ResourceHelpers.GetImageStream());
});
b.UsePages(ContentReference.RootPage)
.WithStartPage<StartPage>(p =>
{
p.Name = "Home Page";
p.MainContentArea
.AddExistingItems(teaser2Ref, teaser3Ref)
.AddItem<TeaserBlock>("Start Page Teaser", b =>
{
b.Heading = ResourceHelpers.Faker.Lorem.Slug();
b.Text = ResourceHelpers.Faker.Lorem.Paragraph();
b.Image = PropertyHelpers.GetOrAddMedia<ImageFile>("Image 2", ".png", ResourceHelpers.GetImageStream());
});
}, CultureInfo.GetCultureInfo("sv"), t =>
{
t.Name = "Start Page [SV]";
}, l1 =>
{
l1
.WithPage<ArticlePage>(out articlePageRef, p =>
{
p.Name = "article1";
p.MetaTitle = ResourceHelpers.Faker.Lorem.Slug();
p.TeaserText = ResourceHelpers.Faker.Lorem.Paragraph();
p.MainBody
.AddStringFragment(ResourceHelpers.Faker.Lorem.Paragraphs())
.AddContentFragment(PropertyHelpers.GetOrAddMedia<ImageFile>("Image 1", ".png", ResourceHelpers.GetImageStream()))
.AddStringFragment(ResourceHelpers.Faker.Lorem.Paragraphs());
p.PageImage = PropertyHelpers.GetOrAddMedia<ImageFile>("Image 1", ".png", ResourceHelpers.GetImageStream());
p.MainContentArea
.AddItem<JumbotronBlock>("Jumbotron Block", b =>
{
b.ButtonText = ResourceHelpers.Faker.Lorem.Slug();
b.ButtonLink = new Url(ResourceHelpers.Faker.Internet.Url());
b.Heading = ResourceHelpers.Faker.Lorem.Slug();
})
.AddItem<ImageFile>(options: i =>
{
i.Name = "Test Image";
i.ContentLink = PropertyHelpers.GetOrAddMedia<ImageFile>("Image 1", ".png", ResourceHelpers.GetImageStream());
})
.AddExistingItem(teaser3Ref);
})
.WithPages<ArticlePage>(p =>
{
p.Name = "Article 33";
p.MetaTitle = ResourceHelpers.Faker.Lorem.Slug();
p.TeaserText = ResourceHelpers.Faker.Lorem.Paragraph();
p.MainBody.AddStringFragment(ResourceHelpers.Faker.Lorem.Paragraphs(10));
p.MainContentArea.AddExistingItem(teaser2Ref);
}, 100);
})
.WithPage<StandardPage>(out var notFoundPageRef, p =>
{
p.Name = "Not Found Page";
})
.WithPages<ArticlePage>(p =>
{
p.Name = ResourceHelpers.Faker.Lorem.Slug(2);
p.MainContentArea
.AddItems<TeaserBlock>(b =>
{
b.Heading = ResourceHelpers.Faker.Lorem.Slug();
b.Text = ResourceHelpers.Faker.Lorem.Paragraph();
b.Image = PropertyHelpers.GetOrAddMedia<ImageFile>("Image 1", ".png", ResourceHelpers.GetImageStream());
}, 10);
}, 10)
.WithPages<ArticlePage>(p =>
{
p.Name = ResourceHelpers.Faker.Lorem.Slug(3);
p.MainContentArea
.AddItems<TeaserBlock>(b =>
{
b.Heading = ResourceHelpers.Faker.Lorem.Slug();
b.Text = ResourceHelpers.Faker.Lorem.Paragraph();
b.Image = PropertyHelpers.GetOrAddMedia<ImageFile>("Image 1", ".png", ResourceHelpers.GetImageStream());
}, 2);
}, 2);
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.3 | 164 | 2/20/2026 |