Fejlesztőknek
Kezdj bele
Témák/Theme SDK/Modules/data/Types: CollectionLookup to PostLookup

Types: CollectionLookup to PostLookup

Ez az oldal még csak angolul érhető el.

The types of @poltura/theme-sdk/data, CollectionLookup to PostLookup.

Ezen az oldalon
import { … } from '@poltura/theme-sdk/data';

CollectionLookup

Names one collection, by its URL segment or by its id.

type CollectionLookup = {
    readonly handle: string;
} | {
    readonly id: string;
}

ProductAttributeLookup

Selects what useProductAttributes reads: by key, or every attribute a category offers.

type ProductAttributeLookup = {
    readonly handles: readonly string[];
} | {
    readonly categoryId: string;
}

CollectionListPick

One pick of a collectionList setting: a collection or a category by its URL segment.

kindrequired'collection' | 'category'

Whether the pick is a collection or a category.

handlerequiredstring

The URL segment, the full path for a subcategory.

CollectionListEntry

A collection or category in a collection list.

kindrequired'collection' | 'category'

Whether it is a collection or a category.

idrequiredstring

Its id.

titlerequiredstring

Its title in the page language.

hrefrequiredstring

Its page's path.

imagerequiredMediaImageRef | null

Its image, or null.

ContentEntry

A content page, blog post or guide as a setting points to it.

idrequiredstring

Its id.

kindrequired'page' | 'post' | 'guide'

Whether it is a site page, a blog post or a guide.

titlerequiredstring

Its title in the page language.

excerptrequiredstring | null

Its short summary, or null.

hrefrequiredstring

Its path.

coverrequired{ readonly url: string; readonly alt: string | null; } | null

Its cover image, or null.

publishedAtrequiredstring | null

When it was published, as an ISO 8601 moment, or null.

PostLookup

The value of a post setting: a blog post or a guide by its URL segment.

kindrequired'post' | 'guide'

Whether it is a blog post or a guide.

slugrequiredstring

Its URL segment.

Utoljára frissítve