# You must use a tab-size of 4 spaces to edit this file.
---
site_settings:
    setting_group: search_engine_optimisation
    title: Editing settings for search engine optimisation
    tabs:
        urls:
            label: Friendly URLs
            edit_mode:
                enabled: true
                priv: _PRIV_EDIT_SITE_SETTING
                on: No
            fields:
                description:
                    full_width: true
                    snippet:
                        html: >
                            Friendly URLs are more readable for visitors and may improve search engine optimisation.
                friendly_urls_disabled_warning:
                    pre_field_html: "<div class=\"zenario_fbWarning\">"
                    snippet: 
                        html: |
                            <p>On a publicly viewable website, for best SEO, you should turn on friendly URLs.</p>
                            <p>With friendly URLs, visitors see easy-to-read URLs (aliases), instead of numeric page codes.</p>
                    post_field_html: "</div>"
                    hidden: false
                mod_rewrite_enabled:
                    site_setting:
                        name: mod_rewrite_enabled
                    label: 'Use friendly URLs for visitors'
                    type: checkbox
                    value: true
                    format_onchange: true
                    note_below: |
                        Recommended.
                        <br />
                        Note that your Apache web server must be configured with support for mod_rewrite and is configured with the Zenario .htaccess file for correct rewrite rules.
                        <br />
                        <a href="https://zenar.io/search-engine-friendly-urls.html" target="_blank">More information</a>.
                mod_rewrite_admin_mode:
                    indent: 1
                    site_setting:
                        name: mod_rewrite_admin_mode
                    visible_if: |
                        zenarioAB.value('mod_rewrite_enabled')
                    label: 'Use friendly URLs in admin mode too'
                    note_below: |
                            Recommended.
                            <br />
                            Allows administrators to see friendly URLs while in admin mode.
                    type: checkbox
                    value: 1
                mod_rewrite_suffix:
                    indent: 1
                    site_setting:
                        name: mod_rewrite_suffix
                    visible_if: |
                        zenarioAB.value('mod_rewrite_enabled')
                    label: 'mod_rewrite suffix:'
                    type: select
                    value: ""
                    empty_value: '-- No suffix (recommended) --'
                    note_below: |
                        An optional suffix which every friendly URL will have.
                        Internal links created by Zenario will have this suffix.
                mod_rewrite_slashes:
                    indent: 1
                    site_setting:
                        name: mod_rewrite_slashes
                    visible_if: |
                        zenarioAB.value('mod_rewrite_enabled')
                    label: 'Show menu structure in friendly URLs'
                    type: checkbox
                    value: true
                    redraw_onchange: true
                    note_below: |
                        Enable this option to make URLs of deeper-level pages be preceded by the aliases of pages above them in the menu.
                        <br />
                        e.g. <code>zenariosite.com/products/top-sellers/another-page</code>
                        <br />
                        ...where <code>products</code> would be the alias of a level 1 page, <code>top-sellers</code> that of a level 2 page, and <code>another-page</code> a level 3 page.
                        <br />
                        This may further improve search engine optimisation.
                        
                translations_different_aliases:
                    visible_if: |
                        zenarioA.multipleLanguagesEnabled()
                    site_setting:
                        name: translations_different_aliases
                    label: 'Alias rules on a multi-language site:'
                    type: select
                    empty_value: Keep aliases of content items in a translation chain the same
                    values:
                        1: Allow aliases of content items in a translation chain to be set independently
                    value: "1"
                    note_below: |
                        When set to "same", a content item and all of its translations will have the same alias, e.g. in the default language, for easier management.
                        When set to "set independently", items in a translation chain may be different, e.g. each  may be in the translation's language.
                        Changing this setting will not change existing aliases.
                translations_hide_language_code:
                    visible_if: |
                        zenarioA.multipleLanguagesEnabled()
                        && !zenarioAB.value('mod_rewrite_slashes')
                    site_setting:
                        name: translations_hide_language_code
                    full_width: true
                    type: select
                    empty_value: Always show the language code
                    values:
                        1: Hide the language code if possible
                    value: "1"
                note_a:
                    visible_if: |
                        zenarioA.multipleLanguagesEnabled()
                        && !zenarioAB.value('mod_rewrite_slashes')
                    same_row: true
                    snippet:
                        html: ''
                    note_below: >
                        If set to "always show", the language code will be added after the alias using a comma,
                        e.g.: <u>example.com/pagename,en</u>. If set to "hide", the language code will not be shown unless there are translations of that content item.
                note_b:
                    visible_if: |
                        zenarioA.multipleLanguagesEnabled()
                        && zenarioAB.value('mod_rewrite_slashes')
                    same_row: true
                    snippet:
                        html: ''
                    note_below: >
                        The language code will always be added before the alias using a slash,
                        e.g.: example.com/en/pagename
                note_c:
                    same_row: true
                    snippet:
                        html: ''
                    note_below: >
                        For the languages that have a language-specific domain name,
                        the domain will be used to show the language instead,
                        e.g.: en.example.com/pagename
                note_d:
                    same_row: true
                    snippet:
                        html: ''
                    note_below: >
                        Your language-specific domain names will be used to show the language,
                        e.g.: en.example.com/pagename
        sitemap:
            label: XML sitemap
            edit_mode:
                enabled: Yes
                priv: _PRIV_EDIT_SITE_SETTING
                on: No
            fields:
                description:
                    full_width: Yes
                    snippet:
                        html: |
                            <p>Zenario can generate an XML sitemap, which helps search engines to index this site.</p>
                            <p>It includes the URLs of all published, non-private content items.</p>
                sitemap_disabled_warning:
                    pre_field_html: "<div class=\"zenario_fbWarning\">"
                    snippet: 
                        html: "XML Sitemap cannot be enabled unless Friendly URLs are enabled."
                    post_field_html: "</div>"
                    hidden: false
                sitemap_enabled:
                    site_setting:
                        name: sitemap_enabled
                    label: 'Generate an XML sitemap'
                    type: checkbox
                    format_onchange: Yes
                sitemap_url:
                    indent: 1
                    label: 'Sitemap URL:'
                    type: text
                    readonly: readonly
                    note_below: |
                        The XML sitemap will have the above URL. It is not editable.
                        Copy and paste this URL into search engine tools such as <a href="https://www.google.com/webmasters/tools/" target="_blank">Google Webmaster Tools</a>.
                        Friendly URLs must be enabled in order to enable the XML sitemap.
        robots_txt:
            label: robots.txt
            edit_mode:
                enabled: Yes
                priv: _PRIV_EDIT_SITE_SETTING
                on: No
            notices:
                robots_txt_does_not_include_sitemap:
                    show: false
                    message: The XML sitemap is not being mentioned in the robots.txt file, so search engines may not be aware of it. Click "Default config" to apply the default robots.txt configuration, and thereby include it.
                    type: warning
                robots_txt_refers_to_disabled_sitemap:
                    show: false
                    message: XML sitemap is being referred to but is not enabled; go to the XML sitemap tab to enable the XML sitemap.
                    type: warning
            fields:
                description:
                    full_width: Yes
                    snippet:
                        html: |
                            <p>Zenario generates a robots.txt file, which tells search engine crawlers which URLs they can access on this site.</p>
                generate_robots_txt_file:
                    label: Generate a robots.txt file
                    type: checkbox
                    value: true
                    readonly: true
                robots_config_info_message__blocks_all:
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">Using the block-all configuration</div>
                robots_config_info_message__default_config:
                    snippet:
                        html: |
                            <div class="zenario_fbInfo">Using the default configuration</div>
                robots_txt_file_contents:
                    indent: 1
                    label: 'robots.txt contents:'
                    site_setting:
                        name: robots_txt_file_contents
                        protect_from_database_restore: true
                    type: textarea
                    style: "height:400px"
                    value: |
                        User-agent: *
                        Disallow: /admin/
                        Disallow: /admin.php*
                        Disallow: /cache/
                        Disallow: /organizer.php*
                        Disallow: /private/
                        Disallow: /staging.php*
                        Disallow: /zenario/
                        Disallow: /zenario/cookie_message.php
                        Disallow: /zenario/admin/
                        Disallow: /zenario/api/
                        Disallow: /zenario/frameworks/
                        Disallow: /zenario/includes/
                        Disallow: /zenario_custom/
                        Disallow: /zenario_extra_modules/
                        Disallow: /*?slotName*
                        Disallow: /*?tag*
                        Allow: /zenario/js/*
                        Allow: /zenario/libs/manually_maintained/*
                        Allow: /zenario/libs/yarn/*
                        Allow: /zenario/styles/*
                        Allow: /zenario_custom/skins/*
                    validation:
                        required: 'Please enter the contents for the robots.txt file.'
                    # Reset the state of the buttons below if the user types in the box
                    format_onchange: true
                robots_txt_file_contents_required_lines_description:
                    indent: 1
                    snippet:
                        html: |
                            <div class="zenario_fbWarning">
                                The robots.txt file must include:<br />
                                <br /><code>User-agent: *</code><br />
                                
                                <br /> and EITHER:<br />
                                <br /><code>Disallow: /</code><br />
                                <br />OR all of the following lines (in any order):<br />

                                <br /><code>Disallow: /cache/</code>
                                <br /><code>Disallow: /private/</code>
                                <br /><code>Disallow: /zenario/admin/</code>
                                <br /><code>Disallow: /zenario/api/</code>
                                <br /><code>Disallow: /zenario/</code>
                                <br /><code>Disallow: /zenario/includes/</code>
                                <br /><code>Disallow: /zenario_custom/</code>
                                <br /><code>Disallow: /zenario/cookie_message.php</code>
                            </div>
                    hidden: true
                
                # Here we want two buttons that change the textarea above to one of two template values.
                # If the buttons are pressed they should also appear temporarily greyed out until the text box is changed.
                # We'll do this by using dummy buttons that are swapped out as needed.
                block_all:
                    indent: 1
                    type: submit
                    onclick: |
                        lib.markAsChanged();
                    css_class: zenario_gp_button
                    value: 'Block all'
                    format_onchange: true
                default_config:
                    same_row: true
                    indent: 1
                    type: submit
                    onclick: |
                        lib.markAsChanged();
                    css_class: zenario_gp_button
                    value: 'Default config'
                    format_onchange: true
