How to use the scrivito.provideObjClass function in scrivito

To help you get started, we’ve selected a few scrivito examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Scrivito / scrivito_example_app_js / src / Objs / Blog / BlogObjClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";

const Blog = Scrivito.provideObjClass("Blog", {
  attributes: {
    title: "string",
    navigationBackgroundImage: ["reference", { only: ["Image"] }],
    body: ["widgetlist", { only: "SectionWidget" }],
    ...metadataAttributes,
  },
});

registerTextExtract("Blog", [{ attribute: "body", type: "widgetlist" }]);

export default Blog;
github Scrivito / scrivito_example_app_js / src / Objs / Event / EventObjClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";

const Event = Scrivito.provideObjClass("Event", {
  attributes: {
    body: ["widgetlist", { only: "SectionWidget" }],
    date: "date",
    image: ["reference", { only: ["Image"] }],
    locationName: "string",
    locationStreetAddress: "string",
    locationLocality: "string",
    locationPostalCode: "string",
    locationRegion: "string",
    locationCountry: "string",
    title: "string",
    tags: "stringlist",
    ...metadataAttributes,
  },
});
github Scrivito / scrivito_example_app_js / src / Objs / Download / DownloadObjClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";

const Download = Scrivito.provideObjClass("Download", {
  attributes: {
    blob: "binary",
    tags: "stringlist",
    title: "string",
  },
});

registerTextExtract("Download", [{ attribute: "text", type: "metadata" }]);

export default Download;
github Scrivito / scrivito_example_app_js / src / Objs / SearchResults / SearchResultsObjClass.js View on Github external
import * as Scrivito from "scrivito";
import metadataAttributes from "../_metadataAttributes";

const SearchResults = Scrivito.provideObjClass("SearchResults", {
  attributes: {
    title: "string",
    navigationBackgroundImage: ["reference", { only: ["Image"] }],
    ...metadataAttributes,
  },
});

export default SearchResults;
github Scrivito / scrivito_example_app_js / src / Objs / Page / PageObjClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";
import defaultPageAttributes from "../_defaultPageAttributes";

const Page = Scrivito.provideObjClass("Page", {
  attributes: {
    ...defaultPageAttributes,
    childOrder: "referencelist",
    ...metadataAttributes,
  },
});

registerTextExtract("Page", [
  { attribute: "navigationSection", type: "widgetlist" },
  { attribute: "body", type: "widgetlist" },
]);

export default Page;
github Scrivito / scrivito_example_app_js / src / Objs / BlogPost / BlogPostObjClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";

const BlogPost = Scrivito.provideObjClass("BlogPost", {
  attributes: {
    author: ["reference", { only: "Author" }],
    body: ["widgetlist", { only: "SectionWidget" }],
    publishedAt: "date",
    subtitle: "string",
    tags: "stringlist",
    title: "string",
    titleImage: ["reference", { only: ["Image"] }],
    ...metadataAttributes,
  },
});

registerTextExtract("BlogPost", [{ attribute: "body", type: "widgetlist" }]);

export default BlogPost;
github Scrivito / scrivito_example_app_js / src / Objs / Homepage / HomepageObjClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import defaultPageAttributes from "../_defaultPageAttributes";
import metadataAttributes from "../_metadataAttributes";

const Homepage = Scrivito.provideObjClass("Homepage", {
  attributes: {
    ...defaultPageAttributes,
    showAsLandingPage: ["enum", { values: ["yes", "no"] }],
    cookieConsentLink: "link",
    childOrder: "referencelist",
    footer: ["widgetlist", { only: "SectionWidget" }],
    logoDark: ["reference", { only: ["Image"] }],
    logoWhite: ["reference", { only: ["Image"] }],
    dividerLogo: ["reference", { only: ["Image"] }],
    facebookAppId: "string",
    twitterSite: "string",
    googleMapsApiKey: "string",
    googleAnalyticsTrackingId: "string",
    intercomAppId: "string",
    ...metadataAttributes,
  },
github Scrivito / scrivito_example_app_js / src / Objs / Video / VideoObjClass.js View on Github external
import * as Scrivito from "scrivito";

const Video = Scrivito.provideObjClass("Video", {
  attributes: {
    blob: "binary",
    tags: "stringlist",
  },
});

export default Video;
github Scrivito / scrivito_example_app_js / src / Objs / Job / JobObjClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";
import metadataAttributes from "../_metadataAttributes";

const Job = Scrivito.provideObjClass("Job", {
  attributes: {
    body: ["widgetlist", { only: "SectionWidget" }],
    image: ["reference", { only: ["Image"] }],
    title: "string",

    datePosted: "date",
    validThrough: "date",

    hiringOrganizationName: "string",
    hiringOrganizationWebsite: "string",

    locationStreetAddress: "string",
    locationLocality: "string",
    locationRegion: "string",
    locationPostalCode: "string",
    locationCountry: "string",
github Scrivito / scrivito_example_app_js / src / Objs / Redirect / RedirectObjClass.js View on Github external
import * as Scrivito from "scrivito";

const Redirect = Scrivito.provideObjClass("Redirect", {
  attributes: {
    title: "string",
    link: "link",
  },
});

export default Redirect;

scrivito

Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.

LGPL-3.0
Latest version published 25 days ago

Package Health Score

68 / 100
Full package analysis