New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@constellation4sitecore/foundation-labels

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@constellation4sitecore/foundation-labels

A collection of XM Cloud compatible libraries for SXA Sitecore Development.

latest
npmnpm
Version
1.0.3
Version published
Maintainers
2
Created
Source

Constellation Foundation Labels

Installation

npm install @constellation4sitecore/foundation-labels --save

Setup Serialization

In your project add in sitecore.json

  "modules": [
    ....
    "npm:@constellation4sitecore/foundation-labels"
  ],

Then you can push the items by

dotnet sitecore ser push

Usage

  • Create a Label item in sitecore
  • Copy the created Item ID
  • In your project create a folder for labels
import { Field, ImageField } from '@sitecore-jss/sitecore-jss-nextjs';

export type FooterLabels = {
  Logo: ImageField;
  PrimaryNavigation: Field<string>;
  copyright: Field<string>;
  socialIntroText: Field<string>;
  cookieSettings: Field<string>;
};

export const footerLabelsId = '{399FECA6-B1D3-4534-B97D-4E01BF814228}';
  • In staticProps you can call getLabelsForView to fetch labels
import { getLabelsForView } from '@constellation4sitecore/foundation-labels';

export const getStaticProps: GetStaticComponentProps = async () => {
  const labels = await getLabelsForView<FooterLabels>(footerLabelsId);
  return { labels: labels };
};

FAQs

Package last updated on 28 Jan 2024

Did you know?

Socket

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.

Install

Related posts