{% import "_includes/forms" as forms %} {% import "sprout-base-seo/_includes/sproutseo" as sprout %} {# This needs to be here to make sure the checkboxes work properly #} {% set robotsCheckboxes %}
{{ "Enable?"|t }} {{ "Description"|t }}
{{ forms.lightswitch({ name: robotsNamespace ~ '[noindex]', on: values.robots.noindex }) }}
{{ forms.lightswitch({ name: robotsNamespace ~ '[nofollow]', on: values.robots.nofollow }) }}
{{ forms.lightswitch({ name: robotsNamespace ~ '[noarchive]', on: values.robots.noarchive }) }}
{{ forms.lightswitch({ name: robotsNamespace ~ '[noimageindex]', on: values.robots.noimageindex }) }}
{{ forms.lightswitch({ name: robotsNamespace ~ '[noodp]', on: values.robots.noodp }) }}
{{ forms.lightswitch({ name: robotsNamespace ~ '[noydir]', on: values.robots.noydir }) }}
{% endset %} {% if robotsContext is defined and robotsContext == 'globals' %} {{ forms.field({ label: "Robots"|t ~ sprout.infoIcon({ label: "Robots"|t, search: true, priority: 'globals' }), instructions: "Communicate with robots and try to make them behave a bit differently—if they listen!", errors: '', first: true, }, robotsCheckboxes) }} {% else %} {{ forms.field({ instructions: "Communicate with robots and try to make them behave a bit differently—if they listen!", errors: '', first: true, }, robotsCheckboxes) }} {% endif %}