Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dean-forest-tech/silverstripe-call-to-actions
Module that adds call to actions that can be rendered via their own templates
https://github.com/dean-forest-tech/silverstripe-call-to-actions
Last synced: 2 months ago
JSON representation
Module that adds call to actions that can be rendered via their own templates
- Host: GitHub
- URL: https://github.com/dean-forest-tech/silverstripe-call-to-actions
- Owner: Dean-Forest-Tech
- License: bsd-3-clause
- Created: 2022-08-03T21:17:58.000Z (over 2 years ago)
- Default Branch: 1
- Last Pushed: 2024-07-08T14:15:48.000Z (6 months ago)
- Last Synced: 2024-09-17T03:16:51.869Z (4 months ago)
- Language: PHP
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# SilverStripe Call To Actions
A SilverStripe module that allows creation of custom call to actions
via `SiteConfig` and allows them to be rendered in templates using
unique "slugs"## Installation Instructions
The prefered way to install this module is via composer:
composer require dft/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 `CallToAction`s to your own pages or objects and load them
via a loop/call etc.