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

Open in your IDE?
  1. {% set agencyDataInfo = app.session.get('agencyDataInfo') %}
  2. {% set route = app.request.attributes.get('_route') %}
  3. {% set baseUrl = app.request.schemeAndHttpHost %}
  4. {% set requestUri = app.request.requestUri %}
  5. {% set brandName = agencyDataInfo.agency_name ?? 'Aviatur' %}
  6. {% set siteName = brandName %}
  7. {% set twitterHandle = '@' ~ brandName|replace({' ': ''}) %}
  8. {% if brandName|lower == 'aviatur' %}
  9.     {% set defaultImage = 'https://productos.aviatur.com/mercadeo-2025/aviatur-logo-azul.png' %}
  10. {% else %}
  11.     {% set defaultImage = parameters['blob_azure_assets'] ~ 'assets/' ~ agency_folder.assetStyle() ~ '/img/custom/agency_logo.png' %}
  12. {% endif %}
  13. {% set miamiImage = 'https://productos.aviatur.com/landings-aviaturcom/internacionales/miami/img/miami.webp' %}
  14. {#  canonical  #}
  15. {% set seoSchemaType = null %}
  16. {% set isAvail = false %}
  17. {% set breadcrumb = breadcrumb|default([]) %}
  18. {% set defaultTitle = brandName ~ ' | Agencia de viajes' %}
  19. {% set defaultDescription = 'Reserve vuelos, hoteles, paquetes y cruceros con ' ~ brandName ~ '. La agencia de viajes con los mejores precios.' %}
  20. {% if 'aviatur_general_homepage' in route or requestUri == '/' %}
  21.     {% set canonicalPath = '/' %}
  22.     {% set seoImage = defaultImage %}
  23.     {% set defaultTitle = brandName ~ ' | Agencia de viajes, vuelos, hoteles, paquetes y cruceros' %}
  24.     {% set defaultDescription = 'Reserve vuelos, hoteles, paquetes y cruceros con ' ~ brandName ~ '. Compare precios y viaje con la agencia de viajes.' %}
  25.     {% set seoSchemaType = 'home' %}
  26. {% elseif 'aviatur_search_flights' in route or '/vuelos/' in requestUri %}
  27.     {% set canonicalPath = '/buscar/vuelos/' %}
  28.     {% set seoImage = defaultImage %}
  29.     {% set defaultTitle = brandName ~ ' | Vuelos, hoteles, paquetes y cruceros' %}
  30.     {% set defaultDescription = 'Reserve vuelos, hoteles, paquetes y cruceros con ' ~ brandName ~ '. Viaje con la agencia de viajes.' %}
  31.     {% set seoSchemaType = 'flights' %}
  32.     {% if '/vuelos/resultados' in requestUri or '/vuelos/detalle' in requestUri or 'aviatur_flight' in route %}
  33.         {% set isAvail = true %}
  34.     {% endif %}
  35. {% elseif 'aviatur_search_hotels' in route or '/hoteles/' in requestUri %}
  36.     {% set canonicalPath = '/buscar/hoteles/' %}
  37.     {% set seoImage = miamiImage %}
  38.     {% set defaultTitle = 'Reserve su alojamiento en Colombia y el mundo | ' ~ brandName %}
  39.     {% set defaultDescription = 'Busque y reserve hoteles en Colombia y el mundo. Compare tarifas, categorías y ubicaciones para encontrar su alojamiento ideal con ' ~ brandName ~ '.' %}
  40.     {% set seoSchemaType = 'hotels' %}
  41.     {% if '/hoteles/avail' in requestUri or 'hotel_availability' in route or 'hotel_roomlist' in route or 'checkout' in route %}
  42.         {% set isAvail = true %}
  43.     {% endif %}
  44. {% elseif 'aviatur_search_package' in route or '/paquetes/' in requestUri %}
  45.     {% set canonicalPath = '/buscar/paquetes/' %}
  46.     {% set seoImage = defaultImage %}
  47.     {% set defaultTitle = 'Paquetes turísticos todo incluido | ' ~ brandName %}
  48.     {% set defaultDescription = 'Encuentre y reserve paquetes turísticos todo incluido con ' ~ brandName ~ '. Viajes completos con vuelos, hoteles y traslados en un solo pago.' %}
  49.     {% set seoSchemaType = 'packages' %}
  50.     {% if 'aviatur_package' in route %}
  51.         {% set isAvail = true %}
  52.     {% endif %}
  53. {% elseif 'aviatur_search_cruise' in route or '/cruceros/' in requestUri %}
  54.     {% set canonicalPath = '/buscar/cruceros/' %}
  55.     {% set seoImage = defaultImage %}
  56.     {% set defaultTitle = 'Cruceros por el Caribe y el mundo | ' ~ brandName %}
  57.     {% set defaultDescription = 'Reserve cruceros por el Caribe, Mediterráneo y destinos internacionales con ' ~ brandName ~ '. Experiencias todo incluido en alta mar.' %}
  58.     {% set seoSchemaType = 'cruises' %}
  59.     {% if 'aviatur_cruise' in route and route not in ['aviatur_cruise_search', 'aviatur_cruise_ports_by_region'] %}
  60.         {% set isAvail = true %}
  61.     {% endif %}
  62. {% elseif 'aviatur_multi' in route or '/multi/' in requestUri or 'aviatur_search_flight_hotel_car' in route %}
  63.     {% set canonicalPath = '/buscar/multi/' %}
  64.     {% set seoImage = defaultImage %}
  65.     {% set defaultTitle = 'Vuelo + Hotel - Paquetes combinados | ' ~ brandName %}
  66.     {% set defaultDescription = 'Reserve paquetes de vuelo + hotel con ' ~ brandName ~ '. Combine su transporte y alojamiento para obtener las mejores tarifas en sus viajes.' %}
  67.     {% set seoSchemaType = 'multi' %}
  68.     {% if 'aviatur_multi' in route %}
  69.         {% set isAvail = true %}
  70.     {% endif %}
  71. {% elseif 'aviatur_search_cars' in route or '/autos/' in requestUri %}
  72.     {% set canonicalPath = '/buscar/autos/' %}
  73.     {% set seoImage = defaultImage %}
  74.     {% set defaultTitle = 'Alquiler de autos | ' ~ brandName %}
  75.     {% set defaultDescription = 'Reserve su auto de alquiler con ' ~ brandName ~ '. Los mejores precios y coberturas para su viaje.' %}
  76.     {% set seoSchemaType = 'autos' %}
  77.     {% if '/autos/resultados' in requestUri or '/autos/detalle' in requestUri or 'aviatur_car' in route %}
  78.         {% set isAvail = true %}
  79.     {% endif %}
  80. {% elseif '/parques/' in requestUri %}
  81.     {% set canonicalPath = '/buscar/parques/' %}
  82.     {% set seoImage = defaultImage %}
  83.     {% set defaultTitle = 'Entradas a parques temáticos | ' ~ brandName %}
  84.     {% set defaultDescription = 'Compre sus entradas a los mejores parques temáticos del mundo con ' ~ brandName ~ '.' %}
  85.     {% set seoSchemaType = 'parks' %}
  86.     {% if 'aviatur_park' in route %}
  87.         {% set isAvail = true %}
  88.     {% endif %}
  89. {% elseif 'aviatur_insurance' in route or '/seguros-de-viaje/' in requestUri %}
  90.     {% set canonicalPath = '/buscar/seguros-de-viaje/' %}
  91.     {% set seoImage = defaultImage %}
  92.     {% set defaultTitle = 'Seguro de viaje y asistencias | ' ~ brandName %}
  93.     {% set defaultDescription = 'Viaje protegido con los seguros de viaje y asistencias médicas de ' ~ brandName ~ '.' %}
  94.     {% set seoSchemaType = 'insurance' %}
  95.     {% if 'aviatur_insurance_availability' in route or 'aviatur_insurance_form_secure' in route %}
  96.         {% set isAvail = true %}
  97.     {% endif %}
  98. {% elseif 'aviatur_gift_voucher_home' in route or '/tarjeta-regalo/' in requestUri %}
  99.     {% set canonicalPath = '/tarjeta-regalo/' %}
  100.     {% set seoImage = defaultImage %}
  101.     {% set defaultTitle = 'Tarjeta Regalo Aviatur | Regale el mundo' %}
  102.     {% set defaultDescription = 'Regale experiencias inolvidables con la Tarjeta Regalo Aviatur. Vuelos, hoteles y más.' %}
  103.     {% set seoSchemaType = 'giftcard' %}
  104.     {% if 'aviatur_gift_voucher_personalize' in route or 'checkout' in requestUri %}
  105.         {% set isAvail = true %}
  106.     {% endif %}
  107. {% else %}
  108.     {% set canonicalPath = requestUri %}
  109.     {% set seoImage = defaultImage %}
  110.     {% set defaultTitle = brandName ~ ' | Agencia de viajes' %}
  111.     {% set defaultDescription = 'Reserve vuelos, hoteles, paquetes y cruceros con ' ~ brandName ~ '. La agencia de viajes con los mejores precios.' %}
  112. {% endif %}
  113. {% if isAvail %}
  114.     {% set canonicalPath = requestUri %}
  115. {% endif %}
  116. {% set canonicalUrl = baseUrl ~ canonicalPath %}
  117. {% set finalTitle = seo_title|default(defaultTitle) %}
  118. {% set finalDescription = seo_description|default(defaultDescription) %}
  119. {% set finalMetaTitle = seo_meta_title|default(defaultTitle) %}
  120. {% set finalKeywords = seo_keywords|default('') %}
  121. {# ========== RENDER ========== #}
  122. <title>{% block head_title %}{{ finalTitle }}{% endblock head_title %}</title>
  123. <meta name="description" content="{% block head_description_content %}{{ finalDescription }}{% endblock head_description_content %}">
  124. <meta name="title" content="{% block head_meta_title %}{{ finalMetaTitle }}{% endblock head_meta_title %}">
  125. <meta name="keywords" content="{% block head_keywords %}{% if finalKeywords is not empty %}{{ finalKeywords }}{% endif %}{% endblock head_keywords %}">
  126. {% block head_meta_label %}
  127.     <!-- Open Graph --> 
  128.     <meta property="og:site_name" content="{{ brandName }}">
  129.     <meta property="og:locale" content="es_CO">
  130.     <meta property="og:type" content="website">
  131.     <meta property="og:title" content="{{ finalMetaTitle }}">
  132.     <meta property="og:description" content="{{ finalDescription }}">
  133.     <meta property="og:url" content="{{ canonicalUrl }}">
  134.     <meta property="og:image" content="{{ seoImage }}">
  135.     <meta property="og:image:width" content="1200">
  136.     <meta property="og:image:height" content="630">
  137.     <meta property="og:image:alt" content="{{ brandName }} – viajes y experiencias de lujo">
  138.     <!-- Twitter Cards --> 
  139.     <meta name="twitter:card" content="summary_large_image">
  140.     <meta name="twitter:site" content="{{ twitterHandle }}">
  141.     <meta name="twitter:title" content="{{ finalMetaTitle }}">
  142.     <meta name="twitter:description" content="{{ finalDescription }}">
  143.     <meta name="twitter:image" content="{{ seoImage }}">
  144.     <meta name="twitter:image:alt" content="{{ brandName }} – viajes y experiencias de lujo">
  145.     <meta name="twitter:creator" content="{{ twitterHandle }}">
  146. {% endblock head_meta_label %}
  147. {% if seoSchemaType is not null %}
  148.     {% include '@AviaturTwig/aviatur/Flux/App/components/seo-schema.html.twig' with { 
  149.         'seoSchemaType': seoSchemaType,
  150.         'isAvail': isAvail,
  151.         'breadcrumb': breadcrumb
  152.     } %}
  153. {% endif %}
  154. <meta name="current-route" content="{{ route }}">