public function updateCMSFields(FieldList $fields)
    {
        $msg = _t('JonoM\ShareCare\ShareCare.CMSMessage', 'When this page is shared by people on social media it will look something like this:');
        $tab = 'Root.' . _t('JonoM\ShareCare\ShareCare.TabName', 'Share');
        if ($msg) {
            $fields->addFieldToTab($tab, new LiteralField('ShareCareMessage',
                '<div class="message notice"><p>' . $msg . '</p></div>'));
        }
        $fields->addFieldToTab($tab, new LiteralField('ShareCarePreview',
            $this->owner->RenderWith('ShareCarePreview', array(
                'IncludeTwitter' => self::config()->get('twitter_card'),
                'IncludePinterest' => self::config()->get('pinterest')
            ))));
    }
public function updateCMSFields(FieldList $fields)
    {
        $msg = _t('JonoM\ShareCare\ShareCare.CMSMessage', 'When this page is shared by people on social media it will look something like this:');
        $tab = 'Root.' . _t('JonoM\ShareCare\ShareCare.TabName', 'Share');
        if ($msg) {
            $fields->addFieldToTab($tab, new LiteralField('ShareCareMessage',
                '<div class="message notice"><p>' . $msg . '</p></div>'));
        }
        $fields->addFieldToTab($tab, new LiteralField('ShareCarePreview',
            $this->owner->RenderWith('ShareCarePreview', array(
                'IncludeTwitter' => self::config()->get('twitter_card'),
                'IncludePinterest' => self::config()->get('pinterest')
            ))));
    }
public function updateCMSFields ( FieldList $ fields ) { $ msg = _t ( 'JonoM\ShareCare\ShareCare.CMSMessage' , 'When this page is shared by people on social media it will look something like this:' ) ; $ tab = 'Root.' . _t ( 'JonoM\ShareCare\ShareCare.TabName' , 'Share' ) ; if ( $ msg ) { $ fields -> addFieldToTab ( $ tab , new LiteralField ( 'ShareCareMessage' , '<div class="message notice"><p>' . $ msg . '</p></div>' ) ) ; } $ fields -> addFieldToTab ( $ tab , new LiteralField ( 'ShareCarePreview' , $ this -> owner -> RenderWith ( 'ShareCarePreview' , array ( 'IncludeTwitter' => self :: config ( ) -> get ( 'twitter_card' ) , 'IncludePinterest' => self :: config ( ) -> get ( 'pinterest' ) ) ) ) ) ; }
Add a Social Media tab with a preview of share appearance to the CMS.
Add a Social Media tab with a preview of share appearance to the CMS .