Was this helpful?

Content and Media

Alpaca supports attaching content and media such as photos, video and audio to itinerary content. You can attach content elements of the itinerary, such as customising the title, synopsis, description and other elements.

  • Title and Synopsis
  • Description (Markdown formatted content)
  • Photo Galleries
  • 3rd Party Media (such as videos and audio embeds)

Basic Content Access

Basic content is accessible through properties on the node, as shown in the below query:

1query GetItineraryContent {
2  itinerary(id: "itinerary/ABC123") {
3    # Basic content is immediately accessible against the node
4    title
5    synopsis
6    description # Markdown
7    tags
8
9    # Media (Photos) are accessible via a connection
10    mediaContainers(first: 3) {
11      edges {
12        node {
13          # Media container id
14          id
15          __typename
16
17          # Read the photo resource
18          resource {
19            # Identifiers
20            __typename
21            ... on MediaImage {
22              id
23              # Source
24              thumbnail: source(bestFit: [100, 50]) {
25                url
26              }
27
28              # Content
29              caption
30
31              # Make sure you display the suitable attribution and copyright
32              # on your interface
33              attribution
34              copyright
35            }
36          }
37        }
38      }
39    }
40  }
41}

Sandbox: Configure | Try Operation

Information IconMarkdown is used to allow the user to format content elements using the Itinerary Editor. We avoid using HTML and recommend that you process your Markdown into HTML and control the presentation and formatting of content within your application.
Warning IconAlpaca goes to lengths to avoid any XSS exploits, but recommend that developers consider attaching explicit Content-Security-Policy headers or meta tags and other techniques to help prevent XSS attacks.

alpaca.tech

Copyright © 2024 - Made with love ❤️ in Australia.