Package requires PHP 5.6 or higher
The best way to install XRuff/SocialTags is using Composer:
$ composer require xruff/socialtags
Configuration in config.neon.
extensions:
socialTags: XRuff\Components\SocialTags\DI\SocialTagsExtension
socialTags:
twitter:
card: summary_large_image
creator: 'twitternick'
title: Title
description: Description ...
image: http://...
facebook:
appId:
admins:
url: http://www.example.com
siteName: Title
title: Title
type: website
description: Description ...
image: http://...
locale: cs_cz
Base presenter:
use XRuff\Components\SocialTags\SocialTagsControl;
abstract class BasePresenter extends Nette\Application\UI\Presenter
{
/** @var SocialTagsControl $socialTagsControlFactory @inject */
public $socialTagsControlFactory;
protected function createComponentSocialTags()
{
return $this->socialTagsControlFactory->create();
}
}
@layout.latte:
{control socialTags:twitter}
{control socialTags:facebook}
</head>
<body>
...
Repository https://github.com/XRuff/SocialTags.