setKey('contact'); $this->withSeoSettings('contact', 'contacts')->breadcrumb(); $this->setTemplate('contact', 'contacts'); $this->setTitle(_t('@contacts', 'Contacts / Contact Page')); $this->useBreadcrumbs(); } public function data() { $data = parent::data(); if ($this->request->has('success')) { return Site::showInlineMessage( _t('contacts', 'Your message was successfully sent.
We will try to answer it as soon as possible.') ); } $this->breadcrumbs->add($this->title); return $data; } public function blocks() { $this->addBlock('form', ContactForm::class, function (ContactForm $block) { $block->successUrl = Contacts::url('contact', ['success' => 1]); }); } public function seo() { $this->request->urlCorrection($this->router->url('contacts-contact')); $this->seo->canonicalUrl($this->router->url('contacts-contact', [], ['dynamic' => true])); $this->seoApply(); } public function seoSettings() { } public function settingsForm($form) { $form->text('title', _t('@site', 'Page Title'), _t('contacts', 'Contacts', true)); $form->wysiwyg('intro', _t('@site', 'Page Text')); } }