ipanema / sylius-seo-page-plugin
Seo for page for sylius
Installs: 2 379
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^7.2 || ^8.0
- sylius/sylius: ^1.4
Requires (Dev)
- behat/behat: ^3.4
- behat/mink: ^1.7@dev
- behat/mink-browserkit-driver: ^1.3
- behat/mink-extension: ^2.2
- behat/mink-selenium2-driver: ^1.3
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.0
- friends-of-behat/variadic-extension: ^1.1
- lakion/mink-debug-extension: ^1.2.3
- phpspec/phpspec: ^5.0
- phpstan/phpstan-doctrine: ^0.10
- phpstan/phpstan-shim: ^0.10
- phpstan/phpstan-webmozart-assert: ^0.10
- phpunit/phpunit: ^6.5
- sensiolabs/security-checker: ^5.0
- sylius-labs/coding-standard: ^2.0
- symfony/browser-kit: ^3.4|^4.1
- symfony/debug-bundle: ^3.4|^4.1
- symfony/dotenv: ^4.2
- symfony/intl: ^3.4|^4.1
- symfony/web-profiler-bundle: ^3.4|^4.1
- symfony/web-server-bundle: ^3.4|^4.1
Conflicts
- symfony/browser-kit: 4.1.8
- symfony/dependency-injection: 4.1.8
- symfony/dom-crawler: 4.1.8
- symfony/routing: 4.1.8
- symfony/symfony: 4.1.8
README
Seo page plugin for Sylius
Installation
$ composer require ipanema/sylius-seo-page-plugin
Add plugin dependencies to your config/bundles.php
file:
return [ ... Ipanema\SyliusSeoPagePlugin\IpanemaSyliusSeoPagePlugin::class => ['all' => true], ];
Import required config in your config/packages/_sylius.yaml
file:
# config/packages/_sylius.yaml imports: ... - { resource: "@IpanemaSyliusSeoPagePlugin/Resources/config/config.yml" }
Create routing file ipanema_seo_page.yaml in your config/routes
file:
# config/routes/ipanema_seo_page.yaml ... ipanema_sylius_seo_page_plugin: resource: "@IpanemaSyliusSeoPagePlugin/Resources/config/routing.yml"
Finish the installation by updating the database schema and installing assets:
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate or php bin/console doctrine:schema:update --force
Use of Twig Extension
Create at first {% block metatags %}{% endblock %} in your layout.html.twig if not exist. Extension seo_page render html by default
{% block metatags %} {# by code #} {{ seo_page({'code': 'home'}) }} {# by route #} {{ seo_page({'route': app.request.get('_route')}) }} {# get only data record #} {{ seo_page({'route': app.request.get('_route'), 'data-only': true}) }} {# merge current data with default seo record (search by code ex: default) #} {{ seo_page({'route': app.request.get('_route')}, 'default': 'default') }} {% endblock %}