Skip to content

Instantly share code, notes, and snippets.

View sitefinitySDK's full-sized avatar

Sitefinity SDK sitefinitySDK

View GitHub Profile
{
"servers": {
"sitefinity-aspnet-core": {
"url": "https://mcp.sitefinity.cloud/netcore-widgets/",
"headers": {
"x-sitefinity-url": "https://www.example.com/sf/cms/api/v1/default"
}
}
}
}
{
"servers": {
"sitefinity-nextjs": {
"url": "https://mcp.sitefinity.cloud/nextjs-widgets/",
"headers": {
"x-sitefinity-url": "https://www.example.com/sf/cms/api/v1/default"
}
}
}
}
{
"Commands": {
"Migrate": {
"CmsUrl": "https://yoursitefinityinstance.net",
"Token": "authentication-token",
"PlaceholderMap": {
"Contentplaceholder1": "Body"
},
"Widgets": {
"Telerik.Sitefinity.Modules.GenericContent.Web.UI.ContentBlock": {
"FormFieldNameMap": {
"sf_contactus.TextFieldController": "SitefinityTextFieldFormControl"
}
ObjectFactory.Container.RegisterType<Analyzer, MyCustomAnalyzer>(
nameof(MyCustomAnalyzer),
new ContainerControlledLifetimeManager(),
new InjectionConstructor(
new InjectionParameter<LuceneVersion>(LuceneVersion.LUCENE_48),
new InjectionParameter<CharArraySet>(CharArraySet.Empty)
)
);
<webSecurityConfig xmlns:config="urn:telerik:sitefinity:configuration" xmlns:type="urn:telerik:sitefinity:configuration:type">
<redirectValidation trustedLocations="https://login.microsoftonline.com" />
<cookiesProtector enable="False" />
</webSecurityConfig>
{
"Commands": {
"Migrate": {
...
"Widgets": {
"Telerik.Sitefinity.Modules.GenericContent.Web.UI.ContentBlock": {
// the name of the new widget in ASP.NET Core and Next.js renderers
"Name": "SitefinityContentBlock",
// the whitelist of properties to keep during the migration
"Whitelist": ["Html", "ProviderName", "SharedContentID"],
{
"Commands": {
"Migrate": {
"CmsUrl": "http://localhost",
"Token": "TOKEN",
"Recreate": false,
"Recursive": false,
"Replace": false,
"Action": "publish",
"SiteId": "00000000-0000-0000-0000-000000000000",
```tsx
import { GoogleTagManager } from '@next/third-parties/google'
export default function Page() {
<!--- replace "GTM-XYZ" with your GTM container ID-->
return <GoogleTagManager gtmId="GTM-XYZ" />
}
```tsx
import { GoogleTagManager } from '@next/third-parties/google'
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">