Answer the question
In order to leave comments, you need to log in
October CMS. How to change the title of the record output page using the RecordDetails component?
Hello. I've already seen a similar question here, but still couldn't find an answer. Those. I found it, but I can’t use it, because perfect teapot in the backend Entry
page available
title = ""
url = "object/:slug"
layout = "default"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[builderDetails]
modelClass = "AdminAdmin\Flats\Models\Flats"
identifierValue = "{{ :slug }}"
modelKeyColumn = "slug"
displayColumn = "slug"
notFoundMessage = "Публикация не найдена"
==
<?php
function onEnd() {
$this['record'] = $record = $this->builderDetails->record;
$this->page->title = $record->title;
}
?>
==
{% set displayColumn = builderDetails.displayColumn %}
{% set notFoundMessage = builderDetails.notFoundMessage %}
<!-- Header -->
{% partial 'header' %}
{% if record %}
<!-- Object -->
<section class="section">
<div class="container">
<h1 class="section-title object-title">{{ record.title }}</h1>
<p class="object-address">{{ record.address }}</p>
Ну и дальше там идет верстка, которая не имеет отношения к вопросу
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question