Skip to content

Instantly share code, notes, and snippets.

View KayeeNL's full-sized avatar

Robbert Hock KayeeNL

View GitHub Profile
@KayeeNL
KayeeNL / sitecore-content-hub-create-entity-scroller-example.cs
Created June 17, 2025 06:55
Sitecore Content Hub CreateEntityScroller Example
using Stylelabs.M.Sdk.WebClient;
using Stylelabs.M.Base.Querying;
using Stylelabs.M.Framework.Essentials.LoadConfigurations;
using Microsoft.Extensions.Caching.Memory;
var mClient = new MClient("https://your-contenthub-url", "your-client-id", "your-client-secret");
var memoryCache = new MemoryCache(new MemoryCacheOptions());
var query = Query.CreateQuery(entities =>
from e in entities
@KayeeNL
KayeeNL / sitecore-content-hub-create-entity-iterator-example.cs
Created June 17, 2025 06:53
Sitecore Content Hub CreateEntityIterator Example
using Stylelabs.M.Sdk.WebClient;
using Stylelabs.M.Base.Querying;
using Stylelabs.M.Framework.Essentials.LoadConfigurations;
using Microsoft.Extensions.Caching.Memory;
var mClient = new MClient("https://your-contenthub-url", "your-client-id", "your-client-secret");
var memoryCache = new MemoryCache(new MemoryCacheOptions());
var query = Query.CreateQuery(entities =>
from e in entities
@KayeeNL
KayeeNL / sitecore-content-hub-queryasync-example.cs
Created June 17, 2025 06:50
Sitecore Content Hub QueryAsync Example
using Stylelabs.M.Sdk.WebClient;
using Stylelabs.M.Base.Querying;
using Stylelabs.M.Framework.Essentials.LoadConfigurations;
using Microsoft.Extensions.Caching.Memory;
const int BatchSize = 1000;
int skip = 0;
bool hasMore = true;
var referenceEntities = new List<IEntity>();
FEAAS.External.registerComponent(MyByocComponent, {
name: 'MyByocComponent',
properties: {
title: {
title: 'Title',
type: 'string',
enum: ['Mr', 'Mrs', 'Miss', 'Ms', 'Dr'],
description: 'Please select an appropriate title',
},
tags: {
FEAAS.External.registerComponent(MyByocComponent, {
name: 'MyByocComponent',
properties: {
title: {
title: 'Title',
type: 'string',
enum: ['Mr', 'Mrs', 'Miss', 'Ms', 'Dr'],
description: 'Please select an appropriate title',
},
tags: {
FEAAS.External.registerComponent(MyByocComponent, {
name: 'MyByocComponent',
properties: {
title: {
title: 'Title',
type: 'string',
enum: ['Mr', 'Mrs', 'Miss', 'Ms', 'Dr'],
description: 'Please select an appropriate title',
},
tags: {
FEAAS.External.registerComponent(MyByocComponent, {
name: 'MyByocComponent',
properties: {
title: {
title: 'Title',
type: 'string',
enum: ['Mr', 'Mrs', 'Miss', 'Ms', 'Dr'],
description: 'Please select an appropriate title',
},
tags: {
FEAAS.External.registerComponent(MyByocComponent, {
name: 'MyByocComponent',
properties: {
title: {
title: 'Title',
type: 'string',
enum: ['Mr', 'Mrs', 'Miss', 'Ms', 'Dr'],
description: 'Please select an appropriate title',
},
tags: {
FEAAS.External.registerComponent(MyByocComponent, {
name: 'MyByocComponent',
properties: {
title: {
title: 'Title',
type: 'string',
enum: ['Mr', 'Mrs', 'Miss', 'Ms', 'Dr'],
description: 'Please select an appropriate title',
},
tags: {
FEAAS.External.registerComponent(MyByocComponent, {
name: 'MyByocComponent',
properties: {
title: {
title: 'Title',
type: 'string',
description: 'Please fill in an appropriate title for this component',
},
columnsCount: {
title: 'Columns count',