Information blocks renders as a list on the first tab of the holiday information/FAQs section of the app. They are rendered as cards with some copy and an optional button, or set of buttons. A single button can link to a form of contact, or to place records. You can also choose for it to render several buttons for the available FAQ categories.
{
"id": 4,
"copy": "Don't forget you can also contact us on this email address.",
"type": "email",
"link": "hello@holidaymakerapp.co.uk",
"place": 42,
"menu": "menu-item-slug",
"buttonTitle": "hello@holidaymakerapp.co.uk",
"isOwnersOnly": false,
"sites": [
"park-one"
]
}Type : Integer - Required
This ID number needs to be unique to other information blocks however is not relational to any other logic in the app, therefore can be generated on the fly. This ID number is also used for ordering the information blocks, so it is common to give them IDs of 1..X as they are being written to the data packet.
Type : Information Block Type - Optional
Type for how the button/s should render and behave. Default is "none"
Type : String - Optional
Text used for the single button. typically may be the actual phone number, or email address, or a call to action style title. Ignored if type set to none, or faqs.
Type : String - Optional
This is the email, website, or phone number for the corresponding block types. Is ignored if type is not set to email, website, or phone.
Type : String - Optional
Slug of place menu item to view a list of places of, if the block type is set to 'menu'. Is ignored if type is not set to 'menu'.
Type : Integer - Optional
This is the place ID number to view the detail of, if the block type is set to 'place'. Is ignored if type is not set to 'place'.
Type : Boolean - Optional
If set to true this information block will only be visible to users who have logged in as a home owner.
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 information block should be available for. If this array is missing or empty then the information block will not render for any user.
As we connect to different systems using a range of different languages, we can interpret several things as a true. Generally speaking holidaymaker will use a standard true/false JSON boolean, however we also read a lower case string and checked if they are "1", "true", "yes", or "on" to then create the positive boolean. Unless explicitly noted, all booleans are defaulted as false if the node doesn't exist.
{
"optionOne": true,
"optionTwo": false,
"allTheseAreValidTrues" : [
1, "1", true, "true", "on", "yes"
]
}This is string definition to set an information block's button/s will be rendered and behave. The options available are :
• "none" - No button (default)
• "faqs" - Multiple buttons for all FAQ categories
• "menu" - Navigate to places section filtering by a menu item
• "place" - Navigate to places section and view a specific place record
• "phone" - Trigger a phone call with supplied number
• "email" - Trigger a email with the supplied email address
• "website" - Navigate to an external website
{
"type": "email",
"link": "hello@holidaymakerapp.co.uk",
}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
]
}Acts the same as the standard String type, however If text is assumed to include line breaks then we use a place holder of #BREAK#. These will then be replaced by the relevant line breaks depending on the language, and device that is rendering the text. This is commonly used in entity copy, and addresses. Rich text should not include HTML or other markup. There should always be a contextual consideration as well - for example if you copy includes a html anchor link to 'Read More' - then simply removing the markup will then leave the text 'Read More' which will be a redundant, none clickable piece of text within the app surfaces.
{
"textWithBullets": "This paragraph will now have two line breaks, and then a list of bullets#BREAK##BREAK#• Bullet 1#BREAK#• Bullet 2#BREAK#• Bullet 3",
"address": "Holidaymaker App Ltd#BREAK#Stowey House#BREAK#Bridport Road#BREAK#Dorchester#BREAK#DT12SB"
}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",
]
}