Login / Sign Up

Place Menu Item

A place menu item requires an image url for the background, a title which will be rendered in white on a slight black gradient. Each one also requires a slug which will be an offsite place type, or onsite place type. These are then used to filter the place records. If an item is a sub menu parent, then the slug can be generated. If a menu item includes a double ID, it indicates that it should be half width on the right, with the item with the supplied ID being half width on the left. If a menu item includes a parent id, then it would make that the item with that ID a submenu. Submenu items cannot be set as double items.

Structure

//Example Standard full size example
{
  "id": 1,
  "title": "Food & Drink",
  "slug": "food-drink",
  "image": "https://your-wordpress-install.com/wp-content/uploads/2020/02/restaurant.jpg?v=1680205724"
},

//Example Double Items
{
  "id": 2,
  "title": "Facilities",
  "slug": "facilities",
  "image": "https://your-wordpress-install.com/wp-content/uploads/2020/01/reception-area.jpg?v=1680205724"
},
{
  "id": 3,
  "title": "Swim & Leisure",
  "slug": "swim-leisure",
  "image": "https://your-wordpress-install.com/wp-content/uploads/2020/01/indoor-paddling-pool.jpg?v=1680205724",
  "doubleID": 2
},

//Example Sub Menu
{
  "id": 6,
  "title": "Local Area",
  "slug": "sub_local-area",
  "image": "https://your-wordpress-install.com/wp-content/uploads/2019/11/zoo.jpg?v=1680205724"
},
{
  "id": 7,
  "title": "Attractions",
  "slug": "attractions",
  "image": "https://your-wordpress-install.com/wp-content/uploads/2019/05/CSC_0994-1.jpg?v=1680205724",
  "parentID": 6
},
{
  "id": 8,
  "title": "Places To Visit",
  "slug": "places-to-visit",
  "image": "https://your-wordpress-install.com/wp-content/uploads/2020/02/local.jpg?v=1680205724",
  "parentID": 6
},

Properties

id

Type : Integer - Required

ID of menu item. These need to be unique and are used to link double and parent items within the menu structure, however have no link outside of the menu items. Therefore these can be generated on the fly if required.

title

Type : String - Required

Rendered title of the menu item

slug

Type : String - Required

This is the category slug that this item will use to filter the places when selected. This would be an onsite place type, or offsite place type, which then are used in the category array in places. A submenu parent can have its own generated slug, as this will never be used for filtering - but can be used by push notifications, or to link alert boxes. The holidaymaker CMS slugifys the items title prefixed with 'sub_'

image

Type : Image Url String - Required

Background image of menu item

doubleID

Type : Integer - Optional

If a pair of side by side menu items are desired, then the second (right hand side) should include this property with the ID of the first (left hand side) item.

parentID

Type : Integer - Optional

If a submenu is desired, then the children should include this property with the ID of the parent

sites

Type : Array of String - Optional

Only required for multi site installs - can be disregarded for single park systems. This should be a list of valid groupsite keys which this offer should be available for if you wish to filter it to certain parks. If this array is missing or empty then this menu item will be available for all parks (unlike most other holidaymaker entities)

Required Type Definitions

Image Url String - Reveal

Our app surfaces talk to an image engine on our infrastructure to process and resize images for different smart phone screen densities. Because of this the size of images are less relevant as they are delivered at optimum sizes anyway. However due to processing power and speed we do recommend that image urls are all 3000 pixels or below. The app surfaces will never need an image this large, so it gives you the option of still having a large quality image, but can be loaded in the apps and our infrastructure efficiently. We support both png, jpeg, and webp images. You can optionally include a '?v=' version integer so this can be used for versioning. If you do include this you can ensure images are reprocessed if the source image is changed on your servers.

{
  "imgUrl": "https://your-wordpress-site.com/wp-content/uploads/2023/08/a-large-image-3000x2100.jpg?v=1691481892",
  "image": "https://your-wordpress-site.com/wp-content/uploads/2023/08/a-smaller-image.png"
}

Integer - Reveal

Standard JSON Integer - 0 is commonly considered to be a default value, unless it is an valid ID when -1 is used. For sort priorities 99 is used as the default.

{
  "key1": 9,
  "key2": 42,
  "arrayOfInts": [
    2,
    3,
    5,
    8
  ] 
}

String - Reveal

Standard JSON String - Often will have certain characters escaped depending what system is writing the JSON packet, however our parser only requires to have double quotes (") escaped. UTF-8 encoding is our standard, but others may be accepted if required. If line breaks are required in the text then the Rich Text / Multiline String type is used instead.

{
  "key1": "A string value",
  "key2": "Another string with an some \"quotes\" that need escaping",
  "arrayOfStrings": [
    "Item one as a string",
    "Item two as a string",
    "Item three as a string",
  ] 
}