silverstripe-sponsor 

silverstripe-sponsor

Manages a list of sponsors (name, logo, web site and description), providing a way for showing one of them on every page hit. Furthermore, the module takes care of keeping a bunch of stats for every sponsor, such as hits, last hit datetime, clicks and last click datetime.

The interaction between the SponsorPage and your Page must be explicitely coded. For example by adding this method to your controller:

public function Sponsor() {
    $page = self::get_one('SponsorPage');
    if (empty($page))
        return null;

    $sponsor = $page->Oldest();
    if (empty($sponsor))
        return null;

    return $sponsor;
}

you will be able to use $Sponsor inside your page templates. It will return the DataObject of the oldest hit or clicked sponsor of the first SponsorPage you defined (if any). The call to Oldest() is cached and it updates the stats of the returned sponsor.

Development Team
Admins
Nicola Fontana

Powered by InDefero,
a CĂ©ondo Ltd initiative.