benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
338 stars 207 forks source link

SEO Logo: remove the circular link on the root page to itself #650

Closed aksenovaa closed 5 years ago

aksenovaa commented 5 years ago

It is necessary to remove the circular link on the root page to itself.

If we are on the home page, then in the logo on the header of the site there is a link to the same home page.

In /bootstrap_package/Resources/Private/Partials/Page/Navigation/Main.html

    <f:if condition="{settings.logo.file}">
        <f:then>
            <f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-image" title="{settings.logo.linktitle}">
                <img class="navbar-brand-logo-normal" src="{f:uri.image(src: settings.logo.file)}" alt="{logoAlt}" height="{settings.logo.height}" width="{settings.logo.width}">
                <img class="navbar-brand-logo-inverted" src="{f:uri.image(src: settings.logo.fileInverted)}" alt="{logoAlt}" height="{settings.logo.height}" width="{settings.logo.width}">
            </f:link.page>
        </f:then>
        <f:else>
            <f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-text" title="{settings.logo.linktitle}">{siteTitle}</f:link.page>
        </f:else>
    </f:if>

can do so

<f:if condition="{settings.logo.file}">
    <f:then>
        <f:if condition="{data.uid}=={rootPage}">
            <f:then>
                    <span class="navbar-brand navbar-brand-image" title="{settings.logo.linktitle}">
                    <img class="navbar-brand-logo-normal" src="{f:uri.image(src: settings.logo.file)}" alt="{logoAlt}"
                         height="{settings.logo.height}" width="{settings.logo.width}">
                    <img class="navbar-brand-logo-inverted" src="{f:uri.image(src: settings.logo.fileInverted)}"
                         alt="{logoAlt}"
                         height="{settings.logo.height}" width="{settings.logo.width}">
                    </span>
            </f:then>
            <f:else>
                <f:link.page pageUid="{rootPage}" class="navbar-brand navbar-brand-image" title="{settings.logo.linktitle}">
                    <img class="navbar-brand-logo-normal" src="{f:uri.image(src: settings.logo.file)}" alt="{logoAlt}"
                         height="{settings.logo.height}" width="{settings.logo.width}">
                    <img class="navbar-brand-logo-inverted" src="{f:uri.image(src: settings.logo.fileInverted)}"
                         alt="{logoAlt}"
                         height="{settings.logo.height}" width="{settings.logo.width}">
                </f:link.page>
            </f:else>
        </f:if>
    </f:then>
    <f:else>
        <f:if condition="{data.uid}=={rootPage}">
            <f:then>
                <span class="navbar-brand navbar-brand-text" title="{settings.logo.linktitle}">
                    {siteTitle}
                </span>
            </f:then>
            <f:else>
                <span class="navbar-brand navbar-brand-text" title="{settings.logo.linktitle}">
                    {siteTitle}
                </span>
            </f:else>
        </f:if>
    </f:else>
</f:if>

or send this part of the code to partial

Moongazer commented 5 years ago

Why is this a problem? I see it all the time that an image or header link of articles or whatever is linking to itself. Never heart that this is an issue. Just asking.

aksenovaa commented 5 years ago

Cyclic links are not a big mistake from the point of view SEO. But their presence is undesirable.

Moongazer commented 5 years ago

From a usability point of view: the quasi-standard of a website behaviour that the logo/brandname brings the user ALWAYS back to the main page, should not be violated by behaving suddenly different from what the user learned from his experience. Even if the user is already on the main page, maybe he does not recognize it as such. So a click to the logo brings him to the same page again and maybe he recognize: well, that seems to be the main page than.

gilbertsoft commented 5 years ago

@aksenovaa Thanks for your report. Imho this is no issue, like already mentioned by Moongazer this is a quasi standard and also used here on GH. You always have the option to replace the default Fluid templates in your sitepackage and so I'm gonna to close this issue.