marc-leopold/cms/themes/marc-leopold-api/pages/api-home.htm

46 lines
1.5 KiB
HTML
Raw Permalink Normal View History

2019-02-25 14:26:11 +00:00
title = "API Home"
url = "/api/v1/home"
is_hidden = 0
contentType = "json"
force_show = 0
[builderList imgList]
modelClass = "Studiovx\Marcleopold\Models\IndexImage"
scope = "-"
scopeValue = "{{ :scope }}"
displayColumn = "image"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
[builderList tagList]
modelClass = "Studiovx\Marcleopold\Models\IndexTagline"
scope = "-"
scopeValue = "{{ :scope }}"
displayColumn = "text"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
==
{% set records = imgList.records %}
{% set displayColumn = imgList.displayColumn %}
{% set noRecordsMessage = imgList.noRecordsMessage %}
{% set detailsPage = imgList.detailsPage %}
{% set detailsKeyColumn = imgList.detailsKeyColumn %}
{% set detailsUrlParameter = imgList.detailsUrlParameter %}
{
"success": true,
"bgImages":
[{% for record in records %}"{{ attribute(record, displayColumn)|media }}"{% if not loop.last %},{% endif %}{% endfor %}],
{% set records = tagList.records %}
{% set displayColumn = tagList.displayColumn %}
{% set noRecordsMessage = tagList.noRecordsMessage %}
{% set detailsPage = tagList.detailsPage %}
{% set detailsKeyColumn = tagList.detailsKeyColumn %}
{% set detailsUrlParameter = tagList.detailsUrlParameter %}
"taglines":
[{% for record in records %}{"sort_order": {{ record.sort_order }}, "text": "{{ attribute(record, displayColumn) }}"}{% if not loop.last %},{% endif %}{% endfor %}]
}