Home > @shopware-pwa/composables > useCms

# useCms() function

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Signature:

export declare function useCms(params?: {
    cmsContextName?: string;
}): {
    page: ComputedRef<CmsPageResponse | null>;
    resourceType: ComputedRef<CmsResourceType | null>;
    resourceIdentifier: ComputedRef<string | null>;
    currentSearchPathKey: ComputedRef<string | null>;
    loading: Ref<boolean>;
    search: (path: string, query?: any) => Promise<void>;
    error: Ref<any>;
};

# Parameters

Parameter Type Description
params { cmsContextName?: string; }

Returns:

{ page: ComputedRef<CmsPageResponse | null>; resourceType: ComputedRef<CmsResourceType | null>; resourceIdentifier: ComputedRef<string | null>; currentSearchPathKey: ComputedRef<string | null>; loading: Ref<boolean>; search: (path: string, query?: any) => Promise<void>; error: Ref<any>; }