src/Aviatur/TwigBundle/Resources/views/aviatur/Flux/App/components/seo-schema.html.twig line 1

Open in your IDE?
  1. {% set productData = {
  2.     'flights': {
  3.         'search_meta': {
  4.             'title': brandName ~ ' | Vuelos, hoteles, paquetes y cruceros',
  5.             'description': 'Reserve vuelos, hoteles, paquetes y cruceros con ' ~ brandName ~ '. Viaje con la agencia de viajes.'
  6.         },
  7.         'base': {'url': '/buscar/vuelos/', 'label': 'Vuelos'},
  8.         'default': 'Resultados',
  9.         'app_keywords': ['avail', 'round', 'oneway', 'multi_2', 'detail', 'checkout', 'detalle'],
  10.         'actions': {
  11.             'detail': 'Detalle del vuelo',
  12.             'detalle': 'Detalle del vuelo',
  13.             'checkout': 'Checkout',
  14.             'round': 'Resultados',
  15.             'oneway': 'Resultados'
  16.         },
  17.         'schema': {
  18.             'type': 'Service',
  19.             'page_name': 'Vuelos nacionales e internacionales | Aviatur',
  20.             'service_name': 'Búsqueda y reserva de vuelos',
  21.             'service_desc': 'Servicio de búsqueda, comparación y reserva de vuelos con aerolíneas nacionales e internacionales, con asesoría experta.',
  22.             'service_type': 'Flight booking service',
  23.             'action_type': 'TravelAction',
  24.             'action_name': 'Buscar vuelos',
  25.             'has_offer': true,
  26.             'offer_type': 'AggregateOffer'
  27.         }
  28.     },
  29.     'hotels': {
  30.         'image': miamiImage,
  31.         'search_meta': {
  32.             'title': 'Reserve su alojamiento en Colombia y el mundo | ' ~ brandName,
  33.             'description': 'Busque y reserve hoteles en Colombia y el mundo. Compare tarifas, categorías y ubicaciones para encontrar su alojamiento ideal con ' ~ brandName ~ '.'
  34.         },
  35.         'base': {'url': '/buscar/hoteles/', 'label': 'Hoteles'},
  36.         'default': 'Resultados',
  37.         'app_keywords': ['avail', 'roomlist', 'checkout'],
  38.         'actions': {
  39.             'roomlist': {
  40.                 'label': 'Habitaciones',
  41.                 'parents': [{ 'url': '/buscar/hoteles/', 'label': 'Resultados' }]
  42.             },
  43.             'checkout': 'Checkout'
  44.         },
  45.         'schema': {
  46.             'type': 'Service',
  47.             'page_name': 'Hoteles en Colombia y el mundo | Aviatur',
  48.             'service_name': 'Búsqueda y reserva de hoteles',
  49.             'service_desc': 'Reservas de hoteles económicos y de lujo con disponibilidad garantizada y respaldo Aviatur.',
  50.             'service_type': 'Hotel booking service',
  51.             'action_type': 'SearchAction',
  52.             'action_name': 'Buscar hoteles',
  53.             'has_offer': true,
  54.             'offer_type': 'AggregateOffer'
  55.         }
  56.     },
  57.     'multi': {
  58.         'search_meta': {
  59.             'title': 'Vuelo + Hotel - Paquetes combinados | ' ~ brandName,
  60.             'description': 'Reserve paquetes de vuelo + hotel con ' ~ brandName ~ '. Combine su transporte y alojamiento para obtener las mejores tarifas en sus viajes.'
  61.         },
  62.         'base': {'url': '/buscar/multi/', 'label': 'Vuelo + hotel'},
  63.         'default': 'Resultados',
  64.         'app_keywords': ['results', 'detail', 'checkout'],
  65.         'actions': {
  66.             'detail': 'Detalle del viaje',
  67.             'checkout': 'Checkout'
  68.         },
  69.         'schema': {
  70.             'type': 'Service',
  71.             'page_name': 'Vuelo + hotel | Aviatur',
  72.             'service_name': 'Búsqueda y reserva de vuelo + hotel',
  73.             'service_desc': 'Reserve paquetes de vuelo + hotel para ahorrar en su viaje.',
  74.             'service_type': 'Travel booking service',
  75.             'action_type': 'TravelAction',
  76.             'action_name': 'Buscar vuelo + hotel',
  77.             'has_offer': true,
  78.             'offer_type': 'Offer'
  79.         }
  80.     },
  81.     'packages': {
  82.         'search_meta': {
  83.             'title': 'Paquetes turísticos todo incluido | ' ~ brandName,
  84.             'description': 'Encuentre y reserve paquetes turísticos todo incluido con ' ~ brandName ~ '. Viajes completos con vuelos, hoteles y traslados en un solo pago.'
  85.         },
  86.         'base': {'url': '/buscar/paquetes/', 'label': 'Paquetes'},
  87.         'default': 'Resultados',
  88.         'app_keywords': ['availability', 'detail', 'form'],
  89.         'actions': {
  90.             'detail': 'Detalle del paquete',
  91.             'form': 'Reserva'
  92.         },
  93.         'schema': {
  94.             'type': 'TouristTrip',
  95.             'page_name': 'Paquetes turísticos desde Colombia | Aviatur',
  96.             'service_name': 'Paquetes turísticos personalizados',
  97.             'service_desc': 'Viajes organizados que incluyen vuelos, alojamiento, traslados y experiencias, diseñados a la medida.',
  98.             'service_type': 'Tour package booking service',
  99.             'action_type': 'SearchAction',
  100.             'action_name': 'Buscar paquetes turísticos',
  101.             'has_offer': true,
  102.             'offer_type': 'Offer'
  103.         }
  104.     },
  105.     'cruises': {
  106.         'search_meta': {
  107.             'title': 'Cruceros por el Caribe y el mundo | ' ~ brandName,
  108.             'description': 'Reserve cruceros por el Caribe, Mediterráneo y destinos internacionales con ' ~ brandName ~ '. Experiencias todo incluido en alta mar.'
  109.         },
  110.         'base': {'url': '/buscar/cruceros/', 'label': 'Cruceros'},
  111.         'default': 'Resultados',
  112.         'app_keywords': ['avail', 'detail', 'cabin', 'reservation'],
  113.         'actions': {
  114.             'detail': 'Detalle del crucero',
  115.             'cabin': {
  116.                 'label': 'Cabinas',
  117.                 'parents': [{ 'url': '/cruceros/detail', 'label': 'Detalle del crucero' }]
  118.             },
  119.             'reservation': 'Reserva'
  120.         },
  121.         'schema': {
  122.             'type': 'Service',
  123.             'page_name': 'Cruceros desde Colombia | Aviatur',
  124.             'service_name': 'Búsqueda y reserva de cruceros',
  125.             'service_desc': 'Encuentre y reserve cruceros de lujo y familiares por todo el mundo.',
  126.             'service_type': 'Cruise booking service',
  127.             'action_type': 'SearchAction',
  128.             'action_name': 'Buscar cruceros',
  129.             'has_offer': true,
  130.             'offer_type': 'Offer'
  131.         }
  132.     },
  133.     'autos': {
  134.         'search_meta': {
  135.             'title': 'Alquiler de autos | ' ~ brandName,
  136.             'description': 'Reserve su auto de alquiler con ' ~ brandName ~ '. Los mejores precios y coberturas para su viaje.'
  137.         },
  138.         'base': {'url': '/buscar/autos/', 'label': 'Autos'},
  139.         'default': 'Resultados',
  140.         'app_keywords': ['resultados', 'detail', 'detalle'],
  141.         'actions': {
  142.             'detail': 'Detalle del auto',
  143.             'detalle': 'Detalle del auto'
  144.         },
  145.         'schema': {
  146.             'type': 'Service',
  147.             'page_name': 'Alquiler de autos | Aviatur',
  148.             'service_name': 'Búsqueda y reserva de alquiler de autos',
  149.             'service_desc': 'Alquile autos en destinos nacionales e internacionales con las mejores tarifas.',
  150.             'service_type': 'Car rental booking service',
  151.             'action_type': 'SearchAction',
  152.             'action_name': 'Buscar alquiler de autos',
  153.             'has_offer': true,
  154.             'offer_type': 'Offer'
  155.         }
  156.     },
  157.     'parks': {
  158.         'search_meta': {
  159.             'title': 'Entradas a parques temáticos | ' ~ brandName,
  160.             'description': 'Compre sus entradas a los mejores parques temáticos del mundo con ' ~ brandName ~ '.'
  161.         },
  162.         'base': {'url': '/buscar/parques/', 'label': 'Parques'},
  163.         'default': 'Resultados',
  164.         'app_keywords': ['avaliability', 'checkout'],
  165.         'actions': {
  166.             'checkout': 'Checkout'
  167.         },
  168.         'schema': {
  169.             'type': 'Service',
  170.             'page_name': 'Entradas a parques temáticos | Aviatur',
  171.             'service_name': 'Búsqueda y reserva de entradas a parques temáticos',
  172.             'service_desc': 'Entradas oficiales a Disney, Universal y otros parques temáticos.',
  173.             'service_type': 'Theme park tickets booking service',
  174.             'action_type': 'SearchAction',
  175.             'action_name': 'Buscar entradas a parques',
  176.             'has_offer': true,
  177.             'offer_type': 'Offer'
  178.         }
  179.     },
  180.     'giftcard': {
  181.         'search_meta': {
  182.             'title': 'Tarjeta Regalo Aviatur | Regale el mundo',
  183.             'description': 'Regale experiencias inolvidables con la Tarjeta Regalo Aviatur. Vuelos, hoteles y más.'
  184.         },
  185.         'base': {'url': '/tarjeta-regalo/', 'label': 'Tarjeta Regalo Aviatur'},
  186.         'default': 'Personalizar',
  187.         'app_keywords': ['personalize', 'checkout'],
  188.         'actions': {
  189.             'checkout': {
  190.                 'label': 'Checkout',
  191.                 'parents': [{ 'url': '/tarjeta-regalo/personalizar', 'label': 'Personalizar' }]
  192.             }
  193.         },
  194.         'schema': {
  195.             'type': 'Service',
  196.             'page_name': 'Tarjeta Regalo Aviatur | Regale el mundo',
  197.             'service_name': 'Tarjeta Regalo Aviatur',
  198.             'service_type': 'Gift card',
  199.             'action_type': 'BuyAction',
  200.             'action_name': 'Comprar tarjeta regalo',
  201.             'service_desc': 'Tarjeta regalo para comprar viajes, vuelos, hoteles, paquetes, cruceros y experiencias con Aviatur.',
  202.             'has_offer': true,
  203.             'offer_type': 'AggregateOffer'
  204.         }
  205.     },
  206.     'insurance': {
  207.         'search_meta': {
  208.             'title': 'Seguro de viaje y asistencias | ' ~ brandName,
  209.             'description': 'Viaje protegido con los seguros de viaje y asistencias médicas de ' ~ brandName ~ '.'
  210.         },
  211.         'base': {'url': '/buscar/seguros-de-viaje/', 'label': 'Seguros de viaje'},
  212.         'default': 'Resultados',
  213.         'app_keywords': ['availability', 'form_secure', 'detail'],
  214.         'actions': {
  215.             'form_secure': 'Reserva',
  216.             'detail': 'Detalle'
  217.         },
  218.         'schema': {
  219.             'type': 'Service',
  220.             'page_name': 'Seguro de viaje y asistencias | Aviatur',
  221.             'service_name': 'Búsqueda y compra de seguro de viaje',
  222.             'service_desc': 'Seguros de viaje con cobertura médica internacional y cancelación.',
  223.             'service_type': 'Travel insurance service',
  224.             'action_type': 'BuyAction',
  225.             'action_name': 'Cotizar y comprar seguro de viaje',
  226.             'has_offer': true,
  227.             'offer_type': 'Offer'
  228.         }
  229.     }
  230. } %}
  231. {# Helper Macro for Breadcrumbs #}
  232. {% macro render_breadcrumb(breadcrumb) -%}
  233. "@type": "BreadcrumbList",
  234. "@id": "{{ (app.request.schemeAndHttpHost ~ app.request.requestUri)|split('?')[0] }}#breadcrumb",
  235. "itemListElement": [
  236. {%- for item in breadcrumb -%}
  237. {
  238. "@type": "ListItem",
  239. "position": {{ loop.index }},
  240. "name": "{{ item.label }}"{% if item.url is defined and item.url is not empty %},
  241. "item": "{{ item.url starts with 'http' ? item.url : 'https://www.aviatur.com' ~ item.url }}"{% endif %}
  242. }{%- if not loop.last %},{% endif -%}
  243. {%- endfor -%}
  244. ]
  245. {%- endmacro %}
  246. {% import _self as schema_tools %}
  247. {% if not load_only|default(false) and seoSchemaType is defined %}
  248.     {% set breadcrumb = breadcrumb|default([]) %}
  249.     {% set context = productData[seoSchemaType]|default(null) %}
  250.     {% if breadcrumb is empty and context is not null %}
  251.         {% if isAvail|default(false) %}
  252.             {% set label = context.default %}
  253.             {% set parents = [] %}
  254.             {% for keyword, action in context.actions %}
  255.                 {% if keyword in app.request.attributes.get('_route') or keyword in app.request.requestUri %}
  256.                     {% if action is iterable %}
  257.                         {% set label = action.label %}
  258.                         {% set parents = action.parents|default([]) %}
  259.                     {% else %}{% set label = action %}{% endif %}
  260.                 {% endif %}
  261.             {% endfor %}
  262.             {% set breadcrumb = [{ 'url': '/', 'label': 'Inicio' }, { 'url': context.base.url, 'label': context.base.label }] %}
  263.             {% if parents is not empty %}
  264.                 {% for parent in parents %}{% set breadcrumb = breadcrumb|merge([parent]) %}{% endfor %}
  265.             {% endif %}
  266.             {% set breadcrumb = breadcrumb|merge([{ 'url': app.request.requestUri, 'label': label }]) %}
  267.         {% else %}
  268.             {% set breadcrumb = [{ 'url': '/', 'label': 'Inicio' }, { 'url': context.base.url, 'label': context.base.label }] %}
  269.         {% endif %}
  270.     {% endif %}
  271.     {% if isAvail|default(false) %}
  272.         <script type="application/ld+json">
  273.         [
  274.           {
  275.             "@context": "https://schema.org",
  276.             {{ schema_tools.render_breadcrumb(breadcrumb) }}
  277.           },
  278.           {
  279.             "@context": "https://schema.org",
  280.             {% if context.is_product|default(false) %}
  281.             "@type": "Product",
  282.             "name": "{{ context.schema.service_name }}",
  283.             "description": "{{ context.schema.product_desc }}",
  284.             "brand": { "@type": "Brand", "name": "Aviatur" },
  285.             "image": [ "https://productos.aviatur.com/mercadeo-2025/aviatur-logo-azul.png" ],
  286.             "url": "https://www.aviatur.com{{ context.base.url }}",
  287.             "manufacturer": { "@type": "Organization", "@id": "https://www.aviatur.com/#org" }{% if context.schema.has_offer|default(false) %},
  288.             "offers": {
  289.               "@type": "{{ context.schema.offer_type }}",
  290.               "priceCurrency": "COP",
  291.               "availability": "https://schema.org/InStock",
  292.               "url": "https://www.aviatur.com{{ context.base.url }}"
  293.             }
  294.             {% endif %}
  295.             {% else %}
  296.             "@type": "{{ context.schema.type }}",
  297.             "name": "{{ context.schema.service_name }}",
  298.             "description": "{{ context.schema.service_desc }}",
  299.             "provider": { "@type": "Organization", "@id": "https://www.aviatur.com/#org" },
  300.             "url": "https://www.aviatur.com{{ context.base.url }}"{% if context.schema.has_offer|default(false) %},
  301.             "offers": {
  302.               "@type": "{{ context.schema.offer_type }}",
  303.               "priceCurrency": "COP",
  304.               "availability": "https://schema.org/InStock",
  305.               "url": "https://www.aviatur.com{{ context.base.url }}"
  306.             }
  307.             {% endif %}
  308.             {% endif %}
  309.           }
  310.         ]
  311.         </script>
  312.     {% else %}
  313.         {% if seoSchemaType == 'home' %}
  314.             <script type="application/ld+json">
  315.             {
  316.               "@context": "https://schema.org",
  317.               "@graph": [
  318.                 { "@type": "WebSite", "@id": "https://www.aviatur.com/#website", "url": "https://www.aviatur.com/", "name": "Aviatur", "publisher": { "@id": "https://www.aviatur.com/#org" }, "inLanguage": "es-CO" },
  319.                 { "@type": "WebPage", "@id": "https://www.aviatur.com/#webpage", "url": "https://www.aviatur.com/", "name": "Aviatur | Reservas de vuelos, hoteles y paquetes vacacionales", "isPartOf": { "@id": "https://www.aviatur.com/#website" }, "about": { "@id": "https://www.aviatur.com/#org" }, "inLanguage": "es-CO" }
  320.               ]
  321.             }
  322.             </script>
  323.         {% elseif context is not null and context.schema is defined %}
  324.             <script type="application/ld+json">
  325.             {
  326.               "@context": "https://schema.org",
  327.               "@graph": [
  328.                 { {{ schema_tools.render_breadcrumb(breadcrumb) }} },
  329.                 {
  330.                   "@type": "WebPage",
  331.                   "@id": "https://www.aviatur.com{{ context.base.url }}#webpage",
  332.                   "url": "https://www.aviatur.com{{ context.base.url }}",
  333.                   "name": "{{ context.schema.page_name }}",
  334.                   "isPartOf": { "@id": "https://www.aviatur.com/#website" },
  335.                   "about": { "@id": "https://www.aviatur.com/#org" },
  336.                   "inLanguage": "es-CO"
  337.                 },
  338.                 {% if context.is_product|default(false) %}
  339.                 {
  340.                   "@type": "Product",
  341.                   "@id": "https://www.aviatur.com{{ context.base.url }}#product",
  342.                   "name": "{{ context.schema.service_name }}",
  343.                   "description": "{{ context.schema.product_desc }}",
  344.                   "brand": { "@type": "Brand", "name": "Aviatur" },
  345.                   "image": [ "{{ defaultImage }}" ],
  346.                   "url": "https://www.aviatur.com{{ context.base.url }}"
  347.                 }
  348.                 {% else %}
  349.                 {
  350.                   "@type": "Service",
  351.                   "@id": "https://www.aviatur.com{{ context.base.url }}#service",
  352.                   "name": "{{ context.schema.service_name }}",
  353.                   "serviceType": "{{ context.schema.service_type }}",
  354.                   "provider": { "@id": "https://www.aviatur.com/#org" },
  355.                   "areaServed": "CO",
  356.                   "url": "https://www.aviatur.com{{ context.base.url }}",
  357.                   "potentialAction": {
  358.                     "@type": "{{ context.schema.action_type }}",
  359.                     "name": "{{ context.schema.action_name }}",
  360.                     "target": { "@type": "EntryPoint", "url": "https://www.aviatur.com{{ context.base.url }}" }
  361.                   }
  362.                 }
  363.                 {% endif %}
  364.               ]
  365.             }
  366.             </script>
  367.         {% endif %}
  368.     {% endif %}
  369. {% endif %}