Coder Social home page Coder Social logo

muskie9 / silverstripe-site-notifications Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dynamic/silverstripe-site-notifications

0.0 1.0 0.0 36 KB

Display site notifications like violators and pop ups

License: BSD 3-Clause "New" or "Revised" License

PHP 94.81% JavaScript 2.86% Scheme 2.33%

silverstripe-site-notifications's Introduction

Silverstripe Site Noitifcations

Display site notifications like violators and pop ups

Requirements

  • SilverStripe ^4.0
  • dynamic/silverstripe-linkable ^1.0

Installation

composer require dynamic/silverstripe-site-notifications

License

See License

Configuration

Apply SiteTreeDataExtension to SiteTree:

SilverStripe\CMS\Model\SiteTree:
  extensions:
    - Dynamic\Notifications\Extension\SiteTreeDataExtension

Template

In your top-level Page.ss template:

<% if $Violators %>
    <div class="violators">
        <% loop $Violators %>
            <div id="special-discount-line-{$ID}" class="violators__violator top4">
                <div class="special-discount-content">
                    <div class="special-discount-text">
                        $Content
                    </div>
                </div>
            </div>
        <% end_loop %>
    </div>
<% end_if %>

<% if $PopUps %>
    <% loop $PopUps.Limit(1) %>
        <% if not $PopUpCookie %>
        <div id="eighteen" class="popup special-discount" data-cookie="$CookieName">
            $Content
        </div>
        <% end_if %>
    <% end_loop %>
<% end_if %>

Maintainers

Bugtracker

Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.

If the issue does look like a new bug:

  • Create a new issue
  • Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
  • Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.

Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.

Development and contribution

If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.

silverstripe-site-notifications's People

Contributors

muskie9 avatar jsirish avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.