twin-elements / seo-bundle
SEO bundle for CMS
Installs: 122
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/twin-elements/seo-bundle
Requires
- php: ^7.1 || ^8.0
 - leogout/seo-bundle: ^1.2
 - symfony/framework-bundle: ^4.4 || ^5.4
 
README
add TwinElements\SeoBundle\TwinElementsSeoBundle::class => ['all' => true], in bundles.php
add Seo to entity
/**
 * @ORM\Table(name="test")
 */
class Test implements SeoInterface
{
    use SeoTrait;
}
add Seo fields to forms
class TesteType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('seo', SeoType::class);        
    }
}
add in form layout
{% use '@TwinElementsSeo/seo-fields.html.twig' %}
Displaying meta tags on the page
TestController extends AbstractController{
    public function test(SeoMetaGenerator $seoGenerator){
    
        $seo = new Seo();
    
        $seoGenerator->generate($seo, $url, $imageUrl);
        
    }
}