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

36 lines
1.2 KiB
HTML
Raw Normal View History

2019-02-25 14:26:11 +00:00
title = "Services"
url = "/api/v1/services"
is_hidden = 0
contentType = "json"
force_show = 0
[builderList]
modelClass = "Studiovx\Marcleopold\Models\Services"
scope = "-"
scopeValue = "{{ :scope }}"
displayColumn = "title"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
sortColumn = "sort_order"
sortDirection = "asc"
==
{% set records = builderList.records %}
{% set displayColumn = builderList.displayColumn %}
{% set noRecordsMessage = builderList.noRecordsMessage %}
{% set detailsPage = builderList.detailsPage %}
{% set detailsKeyColumn = builderList.detailsKeyColumn %}
{% set detailsUrlParameter = builderList.detailsUrlParameter %}
{
"success": true,
"services": [
{% for record in records %}{
"heading": "{{ attribute(record, displayColumn) }}",
"html": "{{ record.description|raw }}",
"imageUrl": "{%if record.featured %}{{ record.featured|media }}{% endif %}",
"backgroundImageUrl": "{{ record.featured|mediathumb_resize("width", 800, 70) }}",
"linkUrl": "{{ record.service_url }}"
}{% if not loop.last %},{% endif %}{% endfor %}
]}