PHPackages                             liquidlight/typo3-call-to-actions - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. liquidlight/typo3-call-to-actions

ActiveTypo3-cms-extension

liquidlight/typo3-call-to-actions
=================================

Shared Call to Action repository and plugin, to allow display of your CTAs

2.1.1(4mo ago)02.2k↓50%1[1 issues](https://github.com/liquidlight/typo3-call-to-actions/issues)GPL-2.0+PHPCI passing

Since Nov 5Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/liquidlight/typo3-call-to-actions)[ Packagist](https://packagist.org/packages/liquidlight/typo3-call-to-actions)[ Docs](https://github.com/liquidlight/typo3-call-to-actions)[ RSS](/packages/liquidlight-typo3-call-to-actions/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (16)Used By (0)

Call to Actions
===============

[](#call-to-actions)

***Note**:* This readme is **very much** in draft and needs to be written properly

The Call to Actions extension allows you to have shared Call to Action/Promo boxes which are then displayed throughout the site. It gives editors and integrators a single place to add, edit and update website Call to Actions (CTAs).

CTAs can be shared between multi-site instances and can be customised with different types and themes, along with having styled buttons and images

To Do
=====

[](#to-do)

- Create proper TYPO documentation
- Make the plugin appear in the wizard in version 10
- Add new icon

Installation
------------

[](#installation)

Install via the [TYPO3 Extension Repository](https://extensions.typo3.org/extension/call_to_actions) or composer:

```
composer req liquidlight/typo3-call-to-actions

```

Create a SysFolder (called "Call to Actions" or similar) and create a new "Call to Action" record inside

***Hint**:* If you only want Call to Actions to be made in this SysFolder, edit the page and add the following to the **Page TSconfig `[TSconfig]`** field

```
mod.web_list.allowedNewTables = tx_calltoactions_domain_model_calltoactions

```

Once the Call to Action record is made, navigate to the page you wish to add it and create a new content element

**Plugins** -&gt; **Call to Actions**

Using the Items browser, select the Call to Action you wish to display

***Note**:* The whole page tree is displayed as Call to Action records can be created anywhere

Customisation
-------------

[](#customisation)

### Templates

[](#templates)

If you wish to override the `Templates` or `Partials`, add the following to your `constants` (replacing `site_package` with the name of your custom site package extension)

```
site.fluidtemplate.call_to_actions {
	templateRootPath = EXT:site_package/Resources/Private/Templates
	partialRootPath = EXT:site_package/Resources/Private/Partials
}

```

From create a files which are the same names as the originals

- Template: [`CallToActions.html`](./Resources/Private/Templates/CallToActions.html)
- Partials: [`CallToAction.html`](./Resources/Private/Partials/CallToAction.html)

You may also wish to overwrite the Button, Image or Details partial too - which can be found [in the Partials folder](./Resources/Private/Partials)

Types &amp; Themes
------------------

[](#types--themes)

If you wish to change or add to the Theme and Types dropdowns, you can do this via Typoscript

Add the following to `setup`

```
tt_content.call_to_actions {
	classes {
		type {
			0 {
				title = Simple
				value = simple
			}
			1 {
				title = Featured
				value = featured
			}
		}

		theme {
			0 {
				title = Light
				value = light
			}
			1 {
				title = Dark
				value = dark
			}
		}
	}

```

The numbers are indexes - if you wish to replace one use the same index, however if you only want to add then you can include just that one with an incremental number

`title` is what is shown in the drop down, while `value` is what is output in the template.

e.g.

```
tt_content.call_to_actions {
	classes.type {
		2 {
			title = Highlight
			value = highlightCTA
		}
	}
}

```

### Relating to records

[](#relating-to-records)

***Note*:** Experience in overriding TCAs is required for this

If you want to add Call to Actions on a specific record, such as News or any other custom record type, you will need to override the TCA.

In the example below, a field is added after the `bodytext` on the `tt_news` table

```
