Skip to content

Instantly share code, notes, and snippets.

View sitefinitySDK's full-sized avatar

Sitefinity SDK sitefinitySDK

View GitHub Profile
import { Metadata } from 'next';
import { RenderPage, initRendering, pageMetadata } from '@progress/sitefinity-nextjs-sdk/pages';
import { WidgetExecutionError } from '@progress/sitefinity-nextjs-sdk';
import { widgetRegistry } from '../widget-registry';
import { templateRegistry } from '../template-registry';
export const dynamic = 'force-static';
export const revalidate = 600;
export async function generateMetadata({ params, searchParams }: any): Promise<Metadata> {
// Sitefinity CSS
@import "sitefinity";
//Import .scss files here
@import "setting/colors";
@import "setting/typography";
...
@import "base/link";
@import "base/typography";
|-- scss
|---- settings
|------ _colors.scss
|------ _typography.scss
...
|---- base
|------ _link.scss
|------ _typography.scss
| ResourcePackages
|--- Foundation
|------ assests
|--------- dist
|--------- src
|------------ scss
|--------------- sitefinity
|--------------- main.scss
|------------ images
|------------ js
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Renderer.Models;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@using Progress.Sitefinity.AspNetCore.TagHelpers;
@using Progress.Sitefinity.AspNetCore.Mvc.Rendering;
@model Renderer.ViewModels.ExtendedContentBlockViewModel
<sf-wrapper tag-name="@Model.TagName" class="@Model.WrapperCssClass clearfix">
<h1>Original</h1>
@{
@Html.HtmlSanitize(@Model.Content)
}
using Progress.Sitefinity.AspNetCore.Widgets.Models.ContentBlock;
namespace Renderer.ViewModels
{
/// <summary>
/// Extended viewModel for the ContentBlock view component.
/// </summary>
public class ExtendedContentBlockViewModel : ContentBlockViewModel
{
public ExtendedContentBlockViewModel(ContentBlockViewModel source)
using System.Threading.Tasks;
using Progress.Sitefinity.AspNetCore.Configuration;
using Progress.Sitefinity.RestSdk;
using Progress.Sitefinity.AspNetCore.Widgets.Models.ContentBlock;
using Progress.Sitefinity.AspNetCore.Widgets.ViewComponents.Common;
using Renderer.ViewModels;
using Renderer.Entities;
namespace Renderer.Models
{
/// <summary>
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Progress.Sitefinity.AspNetCore.Configuration;
using Progress.Sitefinity.RestSdk;
using Progress.Sitefinity.Renderer.Designers;
using Progress.Sitefinity.AspNetCore.Widgets.Models.ContentBlock;
namespace Rendererk.Entities
{
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Progress.Sitefinity.AspNetCore;
using Progress.Sitefinity.AspNetCore.FormWidgets;
using Progress.Sitefinity.Renderer.Designers;
using all_properties.Extensibility;