ilateral/silverstripe-call-to-actions

A Silverstripe module allowing you to create call to actions and render them using custom templates

Installs: 147

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Type:silverstripe-vendormodule

1.0.1 2022-08-08 14:02 UTC

This package is auto-updated.

Last update: 2024-04-08 18:04:48 UTC


README

A SilverStripe module that allows creation of custom call to actions via SiteConfig and allows them to be rendered in templates using unique "slugs"

This module is developed and maintained by ilateral

Installation Instructions

The prefered way to install this module is via composer:

composer require ilateral/silverstripe-calltoactions

Usage

Once the module is downloaded and installed, you can create call to actions via:

http://www.yourwebsite.com/admin/settings

And then clicking on the "CTA" tab.

You will then need to create a MenuHolder (or use one of the installed defaults).

By default this module includes two CTA types:

  • Button: A single linkable button that can be added to templates
  • Row: A full width row with short html content and a linkable button

Templates

This module exposes $GetCTA("slug") into all controllers and can be called anywhere from within a controller.

Each CallToAction uses forTemplate to handle rendering their data, so you could also link CallToActions to your own pages or objects and load them via a loop/call etc.