marc-leopold/server/themes/marc-leopold-api/pages/page.htm

25 lines
629 B
HTML
Raw Normal View History

2019-02-25 14:26:11 +00:00
title = "Page"
url = "/api/v1/page/:slug"
is_hidden = 0
contentType = "json"
force_show = 0
[builderDetails]
modelClass = "Studiovx\Marcleopold\Models\Pages"
identifierValue = "{{ :slug }}"
modelKeyColumn = "slug"
displayColumn = "title"
notFoundMessage = "Record not found"
==
{% set record = builderDetails.record %}
{% set displayColumn = builderDetails.displayColumn %}
{% set notFoundMessage = builderDetails.notFoundMessage %}
{% if record %}{
"success": true,
"title": "{{ attribute(record, displayColumn) }}",
"imageUrl": "{{ record.featured_image|media }}"
}{% else %}
{ "success": false }
{% endif %}