Skip to content

Commit

Permalink
field cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirish committed Aug 30, 2023
1 parent 3b6f4fc commit f6dc4dc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
7 changes: 0 additions & 7 deletions src/Extension/CmsDesignDataExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@

namespace Dynamic\Base\Extension;

use SilverStripe\AssetAdmin\Forms\UploadField;
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\TextareaField;
use SilverStripe\Forms\TextField;
use SilverStripe\Forms\ToggleCompositeField;
use SilverStripe\ORM\DataExtension;
use Vulcan\Seo\Builders\FacebookMetaGenerator;
use Vulcan\Seo\Extensions\PageSeoExtension;

/**
* Class \Dynamic\Base\Extension\CmsDesignDataExtension
Expand Down
8 changes: 1 addition & 7 deletions src/Extension/SeoExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,7 @@ public function updateCMSFields(FieldList $fields)
}
}

if (!$this->owner instanceof VirtualPage) {
if ($page_title = $fields->dataFieldByName('Title')) {
$page_title->setTargetLength(45, 25, 60);
}
}

if (!$this->owner instanceof VirtualPage ||
if (!$this->owner instanceof VirtualPage ||
in_array('MetaDescription', $this->owner->config()->get('non_virtual_fields'))) {
if ($meta_description = $fields->dataFieldByName('MetaDescription')) {
$meta_description->setTargetLength(130, 70, static::META_CHAR_COUNT_MAX);
Expand Down

0 comments on commit f6dc4dc

Please sign in to comment.