sonata_seo.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # more information can be found here http://sonata-project.org/bundles/page
  3. #
  4. sonata_seo:
  5. encoding: UTF-8
  6. page:
  7. default: sonata.seo.page.default
  8. title: %sonata_admin.title%
  9. metas:
  10. name:
  11. keywords:
  12. description:
  13. robots: index, follow
  14. property:
  15. # Facebook application settings
  16. #'fb:app_id': XXXXXX
  17. #'fb:admins': admin1, admin2
  18. # Open Graph information
  19. # see http://developers.facebook.com/docs/opengraphprotocol/#types or http://ogp.me/
  20. 'og:site_name': %sonata_admin.title%
  21. 'og:description': %sonata_admin.title%
  22. http-equiv:
  23. 'Content-Type': text/html; charset=utf-8
  24. #'X-Ua-Compatible': IE=EmulateIE7
  25. head:
  26. 'xmlns': http://www.w3.org/1999/xhtml
  27. sitemap:
  28. services:
  29. - sonata.product.seo_iterator
  30. doctrine_orm:
  31. # media
  32. - { connection: doctrine.dbal.default_connection, route: sonata_media_view, parameters: {id: null}, query: "SELECT id, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM media__media WHERE enabled = true" }
  33. # blog post
  34. - { connection: doctrine.dbal.default_connection, route: sonata_news_view, parameters: {permalink: null}, query: "SELECT CONCAT_WS('/', YEAR(created_at), MONTH(created_at), DAY(created_at), slug) as permalink , updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM news__post WHERE enabled = 1 AND (publication_date_start IS NULL OR publication_date_start <= NOW())" }
  35. # page - works only for one site, please adapt the code if required
  36. - { connection: doctrine.dbal.default_connection, route: page_slug, parameters: {path: null}, query: "SELECT url as path, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM page__snapshot WHERE route_name = 'page_slug' AND enabled = 1 AND (publication_date_start IS NULL OR publication_date_start <= NOW())" }
  37. # product categories
  38. - { connection: doctrine.dbal.default_connection, route: sonata_catalog_category, parameters: {category_id: null, category_slug: null}, query: "SELECT id as category_id, slug as category_slug, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM classification__category WHERE enabled = true" }
  39. # products
  40. - { connection: doctrine.dbal.default_connection, route: sonata_product_view, parameters: {productId: null, slug: null}, query: "SELECT id as productId, slug, updated_at as lastmod, 'weekly' as changefreq, '0.5' as prioriy FROM product__product WHERE enabled = true" }