Skip to content

Instantly share code, notes, and snippets.

@sitefinitySDK
Last active February 13, 2025 09:48
import { CssFieldMappings, FieldMapping, FieldMappings } from '@progress/sitefinity-widget-designers-sdk';
import { ContentListEntity } from '@progress/sitefinity-nextjs-sdk/widgets';
import { contentListDefaultViewMeta, ContentListEntity } from '@progress/sitefinity-nextjs-sdk/widgets';
const viewMeta = {
...contentListDefaultViewMeta,
CardsListCustom: [
{ fieldTitle: 'Heading', fieldType: 'ShortText' }
]
};
export class ExtendedContentListEntity extends ContentListEntity {
/**
* Decorators defined here will override the ones from the base entity.
* Other decorators will be inherited
*/
@FieldMappings(viewMeta)
ListFieldMapping: Array<FieldMapping> | null = null;
/**
* Decorators defined here will override the ones from the base entity.
* Other decorators will be inherited
*/
@CssFieldMappings(viewMeta, true)
CssClasses: Array<{ FieldName: string; CssClass: string; }> | null = null;
}
@mstratiev
Copy link

mstratiev commented Feb 3, 2025

...

import { contentListDefaultViewMeta, ContentListEntity } from '@progress/sitefinity-nextjs-sdk/widgets';

const viewMeta = {
    ...contentListDefaultViewMeta,
    CardsListCustom: [
        { fieldTitle: 'Heading', fieldType: 'ShortText' }
    ]
};

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment