This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RestClient, RestSdkTypes } from '@progress/sitefinity-nextjs-sdk/rest-sdk'; | |
const newsItem = await RestClient.getItem({ | |
type: RestSdkTypes.News, | |
id: itemId, | |
provider: itemProvider | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WidgetRegistry, initRegistry, defaultWidgetRegistry } from '@progress/sitefinity-nextjs-sdk'; | |
import { HelloWorld } from './components/hello-world/hello-world'; | |
import { HelloWorldEntity } from './components/hello-world/hello-world.entity'; | |
const customWidgetRegistry: WidgetRegistry = { | |
widgets: { | |
'HelloWorld': { | |
componentType: HelloWorld, // registration of the widget | |
entity: HelloWorldEntity, // registration of the designer | |
editorMetadata: {...} // metadata to be displayed in the WYSIWYG editor - title, available operation, empty content visuals etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WidgetEntity } from '@progress/sitefinity-widget-designers-sdk'; | |
@WidgetEntity('HelloWorld', 'Hello world') | |
export class HelloWorldEntity { | |
Content: string | null = null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { WidgetContext, htmlAttributes } from '@progress/sitefinity-nextjs-sdk'; | |
import { HelloWorldEntity } from './hello-world.entity'; | |
export function HelloWorld(props: WidgetContext<HelloWorldEntity>) { | |
// attributes are needed for the widget to be visible in edit mode | |
const dataAttributes = htmlAttributes(props); | |
return ( | |
<h1 {...dataAttributes}>{props.model.Properties.Content}</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WidgetRegistry, initRegistry, defaultWidgetRegistry } from '@progress/sitefinity-nextjs-sdk'; | |
const contentBlockRegistration = DefaultWidgetRegistry.widgets[‘SitefinityContentBlock’]; | |
contentBlockRegistration.editorMetadata.Title = ‘Modified Content block’ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { WidgetRegistry, initRegistry, defaultWidgetRegistry, CSRFormComponents } from '@progress/sitefinity-nextjs-sdk'; | |
const customWidgetRegistry: WidgetRegistry = { | |
widgets: { | |
... | |
} | |
}; | |
customWidgetRegistry.widgets = { | |
...defaultWidgetRegistry.widgets, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<authenticationConfig xmlns:config="urn:telerik:sitefinity:configuration" xmlns:type="urn:telerik:sitefinity:configuration:type" config:version="15.0.8200.0" enableLogging="True"> | |
</authenticationConfig> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.DependencyInjection; | |
using Progress.Sitefinity.AspNetCore; | |
using Progress.Sitefinity.AspNetCore.FormWidgets; | |
using Progress.Sitefinity.AspNetCore.Web.Security; | |
using html_sanitizer; |
NewerOlder