xruff / socialtags
Nette 扩展 - Facebook 和 Twitter 元标签
v2.0.1
2020-10-27 22:34 UTC
Requires
- nette/application: ^3.0
Requires (Dev)
- nette/application: ^3.0
- tracy/tracy: ^2.7
- vanio/coding-standards: ^0.1@dev
This package is auto-updated.
Last update: 2024-09-28 07:36:40 UTC
README
需求
包需要 PHP 5.6 或更高版本
安装
安装 XRuff/SocialTags 的最佳方式是使用 Composer
$ composer require xruff/socialtags
文档
在 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
基本表示器
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> ...