fond-of-spryker/google-site-verification

1.0.0 2020-03-11 11:27 UTC

This package is auto-updated.

Last update: 2024-04-11 20:14:19 UTC


README

Build Status PHP from Travis config license

Description

Add the google site verification key as a template variable (google_site_verification_key) to twig.

Installation

composer require fond-of-spryker/google-site-verification

Register GoogleSiteVerificationTwigPlugin to TwigDependencyProvider

protected function getTwigPlugins(): array
    {
        return [
            ...
            new GoogleSiteVerificationTwigPlugin(),
        ];
    }

Usage

Use it in template

{% if google_site_verification_key != ''%}<meta name="google-site-verification" content="{{ google_site_verification_key }}" />{% endif %}

ToDo

Since it was extracted from the old ShopApplicationServiceProvider addGlobalTemplateVariables. Move it to a widget instead of passing the key as a global variable