Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@progress/sitefinity-nextjs-sdk
Advanced tools
Provides OOB widgets developed using the Next.js framework, which includes an abstraction layer for Sitefinity communication. Additionally, it offers an expanded API, typings, and tools for further development and integration.
Provides OOB widgets developed using the Next.js framework, which includes an abstraction layer for Sitefinity communication. Additionally, it offers an expanded API, typings, and tools for further development and integration.
Install via npm:
npm i @progress/sitefinity-nextjs-sdk --save
Via yarn:
yarn add @progress/sitefinity-nextjs-sdk
You can get started using it with our starter template in the follwing NextJS samples repo. It provides the needed integration for communicating with a Sitefinity server, setup documentation, and the basic boiler plate for getting started.
The root module contains mainly tooling and interfaces related to widget rendering, models, metadata, renderer contracts.
Creating and declaring custom widgets should adhere to the following convention. Widgets should be registered in a WidgetRegistry by WidgetMetadata, which consists of:
For more information and samples visit our NextJS samples repo.
To ensure the WYSIWYG page and form editor functions correctly, it is necessary to include certain custom HTML attributes when viewing the markup in edit mode. The htmlAttributes is designed to address this requirement comprehensively. Additionally, the classNames helper is provided to facilitate the accumulation of custom CSS classes.
import { htmlAttributes, classNames } from '@progress/sitefinity-nextjs-sdk';
export function CustomWidget(props: WidgetContext<CustomWidgetEntity>) {
const dataAttributes = htmlAttributes(props);
const customCssClasses = classNames('someClassNames');
dataAttributes['className'] = customCssClasses;
return (
<div {...dataAttributes}>
custom widget content
</div>
);
}
To define an area in your custom widget template where children widgets could be added, to the HTML element that would hold them should have the data-sfcontainer attribute set.
The WYSIWYG editor will diplay on that spot the option to add a widget. If you want to have the ability to add widgets to your manually designated places and hide the default empty widget "add widget" placeholder, you can use the setHideEmptyVisual function to modify the dataAttributes.
import { htmlAttributes, setHideEmptyVisual } from '@progress/sitefinity-nextjs-sdk';
function CustomWidget(props: WidgetContext<CustomWidgetEntity>) {
const dataAttributes = htmlAttributes(props);
setHideEmptyVisual(dataAttributes, true); // this would hide the default empty visual
return (
<div {...dataAttributes}>
...
<div id='childrenHolder' data-sfcontainer='containerId'>
</div>
</div>
)
}
import { RestClient } from '@progress/sitefinity-nextjs-sdk/rest-sdk';
Provides a way to communicate with Sitefinity's REST API for the majority of the necessary operations and data queries. The entry static class RestClient is part of the @progress/sitefinity-nextjs-sdk/rest-sdk module.
import * from '@progress/sitefinity-nextjs-sdk/widgets';
import * from '@progress/sitefinity-nextjs-sdk/widgets/forms';
These modules contain the following OOB basic widgets:
import { StyleGenerator } from '@progress/sitefinity-nextjs-sdk/widgets/styling';
Provides styling helper methods and interfaces that we provide mainly in the StyleGenerator class.
For the exact implementation of the widgets and tooling, plese refer to the public NextJS sdk read-only repo
FAQs
Provides OOB widgets developed using the Next.js framework, which includes an abstraction layer for Sitefinity communication. Additionally, it offers an expanded API, typings, and tools for further development and integration.
The npm package @progress/sitefinity-nextjs-sdk receives a total of 1,704 weekly downloads. As such, @progress/sitefinity-nextjs-sdk popularity was classified as popular.
We found that @progress/sitefinity-nextjs-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.