bueckl/silverstripe-cookie-warning

为Silverstripe项目提供Cookie警告。

安装: 195

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 1

开放问题: 1

类型:silverstripe-module

dev-master 2016-03-22 11:02 UTC

This package is auto-updated.

Last update: 2024-09-23 07:48:16 UTC


README

在Silverstripe项目中显示Cookie警告

需求

  • SilverStripe 3.1.*

安装

Composer

  • composer require "bueckl/silverstripe-cookie-warning": "*"

手动

使用方法

  1. 添加到Page.php文件

public static function CookieWarningShown() { $shown = Cookie::get("CookieWarningShown"); if(!$shown) { Cookie::set("CookieWarningShown", true); return false; } return true; }

  1. 链接css存档

'cookie-warning/css/CookieWarning.css'

  1. 添加到模板

<% include CookieWarning %>