Version: current

     1 <?php
     2 /**
     3  * Выводим форму подписки на каждой странице
     4  *
     5  *
     6  *
     7  */
     8
     9 class SubscribeFormAllPagesExtension extends Extension {
    10     function extraStatics() {}
    11
    12     function SubscribeForm() {
    13         if (class_exists('SubscribeForm') && ($page = DataObject::get_one('SubscribeForm'))) {
    14             $controller = ModelAsController::controller_for($page);
    15             $form = $controller->Form();
    16             $form->setHtmlID('SubscribeForm_popup');
    17 //          return $controller->renderWith('SubscribeForm_popup', array('Form' => $form));
    18             return $form;
    19         }
    20         return false;
    21     }
    22 }

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -