Managing Landing Page Layout
API Docs
Detailed technical documentation is available here - Landing Page Layout API Documentation
Overview
This API allows you to retrieve all Landing Pages Layouts created in the Hawksearch dashboard.
Request:
GET /api/v11/LandingPageLayout
Response: The response is a JSON array list, where each landing page layout is an array of string objects, every object being a series of key-value pairs. The description of the data is as follows:
[
{
"PageLayoutId": 3,
"Name": "3 Images (Top), 1 Zone (Bottom)",
"Layout": "<div class=\"grid_12\">\r\n <div class=\"grid_4\">\r\n {{Image1}}\r\n </div>\r\n <div class=\"grid_4\">\r\n {{Image2}}\r\n </div> \r\n <div class=\"grid_4\">\r\n {{Image3}}\r\n </div> \r\n</div>\r\n<div class=\"grid_12\">\r\n {{WidgetZone}}\r\n</div>",
"AssetName": "icon_Column_25.gif",
"CreateDate": "01-01-0001",
"ModifyDate": "01-01-0001"
},
{
"PageLayoutId": 1,
"Name": "4 Example Zones",
"Layout": "<h1>\r\n Hawk Search Landing Page Content Examples\r\n</h1>\r\n<div>\r\n <h4 style='color:#F47622'>\r\n HTML Content\r\n </h4>\r\n <div>\r\n {{HTML Content}} \r\n </div> \r\n</div>\r\n<div>\r\n <h4 style='color:#F47622'>\r\n Image Content\r\n </h4>\r\n <div>\r\n {{Image Content}} \r\n </div> \r\n</div>\r\n<div>\r\n <h4 style='color:#F47622'>\r\n Popular Searches\r\n </h4>\r\n <div>\r\n {{Popular Searches}} \r\n </div> \r\n</div>\r\n<div>\r\n <h4 style='color:#F47622'>\r\n Rich \"What You See Is What You Get\" Text Editor\r\n </h4>\r\n <div>\r\n {{Rich Text}} \r\n </div> \r\n</div>\r\n",
"AssetName": "icon_Column_23.gif",
"CreateDate": "01-01-0001",
"ModifyDate": "01-01-0001"
},
...
]
No | Key | Description | Value Type |
---|---|---|---|
1 | PageLayoutId | The unique identifier of the landing page layout(unique across the whole system) | Number |
3 | Name | Title for landing page layout. | String |
5 | Layout | The HTML with a layout definition | String |
6 | CreateDate | Creation date | Date string in MM-DD-YYYY format |
7 | ModifyDate | Modification date | Date string in MM-DD-YYYY format |
Using API to Get a Landing Page Layout
Overview
This API allows you to retrieve a single landing page layout in Hawksearch dashboard.
Request
GET api/v11/landingPageLayout/{id}
Response
The response is an array of landing page objects, every object being a series of key-value pairs. For the description of the data, please refer to Using API to Create Landing Page Layout
GET Methods
GET api/v11/LandingPageLayout/{id}
- Gets a single landing page layout by its id
- Parameters
- id: Id of a landing page layout (FromUri)
GET api/v11/LandingPageLayout/{name}
- Gets a single landing page layout by its name
- Parameters
- name: Name of a landing page layout (FromUri)
Using API to Create Landing Page Layout
Overview
This API allows you to create a landing page layout in Hawksearch dashboard.
Request:
POST api/v11/landingPageLayout
{
"PageLayoutId": 3,
"Name": "3 Images (Top), 1 Zone (Bottom)",
"Layout": "<div class=\"grid_12\">\r\n <div class=\"grid_4\">\r\n {{Image1}}\r\n </div>\r\n <div class=\"grid_4\">\r\n {{Image2}}\r\n </div> \r\n <div class=\"grid_4\">\r\n {{Image3}}\r\n </div> \r\n</div>\r\n<div class=\"grid_12\">\r\n {{WidgetZone}}\r\n</div>",
"AssetName": "icon_Column_25.gif",
"CreateDate": "01-01-0001",
"ModifyDate": "01-01-0001"
}
Response
The response is an array of landing page layout objects, every object being a series of key-value pairs. For the description of the data, please refer to Using API to Get All Landing Page Layout
Using API to Update Landing Page Layout
Overview
This API allows you to update a landing page layout in Hawksearch dashboard.
Request
PUT api/v11/landingPageLayout/{id}
{
"PageLayoutId": 3,
"Name": "3 Images (Top), 1 Zone (Bottom)",
"Layout": "<div class=\"grid_12\">\r\n <div class=\"grid_4\">\r\n {{Image1}}\r\n </div>\r\n <div class=\"grid_4\">\r\n {{Image2}}\r\n </div> \r\n <div class=\"grid_4\">\r\n {{Image3}}\r\n </div> \r\n</div>\r\n<div class=\"grid_12\">\r\n {{WidgetZone}}\r\n</div>",
"AssetName": "icon_Column_25.gif",
"CreateDate": "01-01-0001",
"ModifyDate": "01-01-0001"
}
Response
The response is an array of landing page layout objects, every object being a series of key-value pairs. For the description of the data, please refer to Using API to Get All Landing Page Layout
PUT Methods
PUT api/v9/landingPageLayout/{id}
- Updates a landing page content
- Parameters
- id: Id of an entity to update (FromUri)
- pageLayout: An entity with updated properties (FromBody)
Using API to Delete a Landing Page Layout
Overview
This API allows you to delete a landing page layout in Hawksearch dashboard.
Request:
DELETE api/v11/landingPageLayout/{id}
Response
The response is an array of landing page layout objects, every object being a series of key-value pairs. For the description of the data, please refer to Using API to Create Landing Page Layout
DELETE Methods
DELETE api/v4/landingPageLayout/{id}
- Deletes a landing page layout
- Parameters
- id: Id of an entity to delete (FromUri)
Updated almost 2 years ago