channelService->getSchema($record->schema)->get(); if (empty($schema->titleTemplate)) { $title = match (get_class($schema)) { CollectionSchema::class => $record->data[$schema->fields->filter(fn(FieldInterface $f) => $f->info->name === "text")->first()->name], FilesSchema::class => $record->_file->path, }; if (empty(trim($title))) { return "~Untitled~"; } return $title; } $m = new Mustache_Engine(array('entity_flags' => ENT_QUOTES)); return $m->render($schema->cardTitle, $record->data); } }