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 Lucene.Net.Documents; | |
using Lucene.Net.Index; | |
using Lucene.Net.Search; | |
using Lucene.Net.Search.Function; | |
using System; | |
namespace SitefinityWebApp.Documentation.Samples.Search | |
{ | |
public class SitefinityCustomScoreQuery : CustomScoreQuery | |
{ |
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 System.Collections.Generic; | |
using Telerik.Sitefinity.Search; | |
using Telerik.Sitefinity.Services.Search.Data; | |
namespace Telerik.Sitefinity.Services.Search | |
{ | |
/// <summary> | |
/// The contract for search operations that provide the ability to create search catalogues, index and returns the documents matching search query. | |
/// </summary> | |
public interface ISearchService |
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 Progress.Sitefinity.AspNetCore; | |
using Progress.Sitefinity.AspNetCore.Widgets.Models.ContentList; | |
using Progress.Sitefinity.Renderer.Designers.Attributes; | |
using Progress.Sitefinity.Renderer.Entities.Content; | |
namespace SandboxWebApp.Entities | |
{ | |
/// <summary> | |
/// Extended entity class for the ContentBlock view component. | |
/// </summary> |
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 { Content, ContentSection, DisplayName } from '@progress/sitefinity-widget-designers-sdk'; | |
import { ContentListEntity } from './content-list/content-list-entity'; | |
import { MixedContentContext } from '../../editor/widget-framework/mixed-content-context'; | |
export class ExtendedContentListEntity extends ContentListEntity { | |
@Content({ | |
Type: 'Telerik.Sitefinity.Lists.Model.ListItem, Telerik.Sitefinity.News.Model.NewsItem, Telerik.Sitefinity.Events.Model.Event', | |
TypeBlacklist: 'Telerik.Sitefinity.DynamicTypes.Model.PressReleases.Pressrelease' | |
}) | |
@DisplayName('') |
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('LocalizedHelloWorld', 'Localized hello world') | |
export class LocalizedHelloWorldEntity { | |
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 { ViewPropsBase } from '@progress/sitefinity-nextjs-sdk'; | |
import { WidgetViewEntity } from '../widget-view-entity'; | |
export function CustomViewExample(props: ViewPropsBase<WidgetViewEntity>) { | |
return (<h1>Custom view for the widget view that overrides the default one</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
if (!hasAuthCookie && !request.nextUrl.pathname.startsWith('/render-lazy')) { | |
const headers = request.headers; | |
headers.set('x-cached-route-processed', 'true'); | |
let url = new URL(request.url); | |
url.pathname = '/cached' + request.nextUrl.pathname; | |
return NextResponse.rewrite(url, { | |
request: { | |
headers: headers |
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 { SitefinityData } from './widgets/sitefinity-data/sitefinity-data'; | |
import { SitefinityDataEntity } from './widgets/sitefinity-data/sitefinity-data.entity'; | |
const customWidgetRegistry: WidgetRegistry = { | |
widgets: { | |
'SitefinityData': { | |
componentType: SitefinityData, // registration of the widget | |
entity: SitefinityDataEntity, // registration of the designer | |
ssr: true, // whether this is a server rendered or client rendered component |
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 { SitefinityDataEntity } from './sitefinity-data.entity'; | |
import { ViewPropsBase } from '@progress/sitefinity-nextjs-sdk/widgets'; | |
import { SdkItem } from '@progress/sitefinity-nextjs-sdk/rest-sdk'; | |
export interface SitefinityDataViewProps<T extends SitefinityDataEntity> extends ViewPropsBase<T> { | |
items: SdkItem[]; | |
} |
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, getMinimumWidgetContext, htmlAttributes } from '@progress/sitefinity-nextjs-sdk'; | |
import { RestClient, RestSdkTypes } from '@progress/sitefinity-nextjs-sdk/rest-sdk'; | |
import { RenderView } from '@progress/sitefinity-nextjs-sdk/widgets'; | |
import { SitefinityDataEntity } from './sitefinity-data.entity'; | |
import { SitefinityDataDefaultView } from './sitefinity-data.view'; | |
import { SitefinityDataViewProps } from './sitefinity-data.view-props'; | |
export async function SitefinityData(props: WidgetContext<SitefinityDataEntity>) { |
NewerOlder