{"id":34725811,"url":"https://github.com/liquidlight/typo3-call-to-actions","last_synced_at":"2026-01-20T17:13:58.605Z","repository":{"id":44779453,"uuid":"424310912","full_name":"liquidlight/typo3-call-to-actions","owner":"liquidlight","description":"TYPO3 Extension to make Call to Actions","archived":false,"fork":false,"pushed_at":"2025-12-19T15:17:34.000Z","size":274,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-22T06:06:06.363Z","etag":null,"topics":["extension","typo3","typo3-extension"],"latest_commit_sha":null,"homepage":"https://extensions.typo3.org/extension/call_to_actions","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liquidlight.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-03T16:59:57.000Z","updated_at":"2025-12-19T15:17:38.000Z","dependencies_parsed_at":"2024-03-13T13:55:25.437Z","dependency_job_id":"643839d6-033e-4327-92a3-ad1af0a6eff8","html_url":"https://github.com/liquidlight/typo3-call-to-actions","commit_stats":{"total_commits":44,"total_committers":3,"mean_commits":"14.666666666666666","dds":"0.13636363636363635","last_synced_commit":"e00367b8adff1e188ae7bc4fb6fa9c791b8b8527"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/liquidlight/typo3-call-to-actions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-call-to-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-call-to-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-call-to-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-call-to-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liquidlight","download_url":"https://codeload.github.com/liquidlight/typo3-call-to-actions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liquidlight%2Ftypo3-call-to-actions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","typo3","typo3-extension"],"created_at":"2025-12-25T02:27:11.127Z","updated_at":"2026-01-20T17:13:58.579Z","avatar_url":"https://github.com/liquidlight.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Call to Actions\n\n_**Note**:_ This readme is **very much** in draft and needs to be written properly\n\nThe 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).\n\nCTAs can be shared between multi-site instances and can be customised with different types and themes, along with having styled buttons and images\n\n# To Do\n\n- Create proper TYPO documentation\n- Make the plugin appear in the wizard in version 10\n- Add new icon\n\n## Installation\n\nInstall via the [TYPO3 Extension Repository](https://extensions.typo3.org/extension/call_to_actions) or composer:\n\n```\ncomposer req liquidlight/typo3-call-to-actions\n```\n\nCreate a SysFolder (called \"Call to Actions\" or similar) and create a new \"Call to Action\" record inside\n\n_**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\n\n```\nmod.web_list.allowedNewTables = tx_calltoactions_domain_model_calltoactions\n```\n\nOnce the Call to Action record is made, navigate to the page you wish to add it and create a new content element\n\n**Plugins** -\u003e **Call to Actions**\n\nUsing the Items browser, select the Call to Action you wish to display\n\n_**Note**:_ The whole page tree is displayed as Call to Action records can be created anywhere\n\n## Customisation\n\n### Templates\n\nIf 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)\n\n```\nsite.fluidtemplate.call_to_actions {\n\ttemplateRootPath = EXT:site_package/Resources/Private/Templates\n\tpartialRootPath = EXT:site_package/Resources/Private/Partials\n}\n```\n\nFrom create a files which are the same names as the originals\n\n- Template: [`CallToActions.html`](./Resources/Private/Templates/CallToActions.html)\n- Partials: [`CallToAction.html`](./Resources/Private/Partials/CallToAction.html)\n\nYou may also wish to overwrite the Button, Image or Details partial too - which can be found [in the Partials folder](./Resources/Private/Partials)\n\n## Types \u0026 Themes\n\nIf you wish to change or add to the Theme and Types dropdowns, you can do this via Typoscript\n\nAdd the following to `setup`\n\n```\ntt_content.call_to_actions {\n\tclasses {\n\t\ttype {\n\t\t\t0 {\n\t\t\t\ttitle = Simple\n\t\t\t\tvalue = simple\n\t\t\t}\n\t\t\t1 {\n\t\t\t\ttitle = Featured\n\t\t\t\tvalue = featured\n\t\t\t}\n\t\t}\n\n\t\ttheme {\n\t\t\t0 {\n\t\t\t\ttitle = Light\n\t\t\t\tvalue = light\n\t\t\t}\n\t\t\t1 {\n\t\t\t\ttitle = Dark\n\t\t\t\tvalue = dark\n\t\t\t}\n\t\t}\n\t}\n```\n\nThe 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\n\n`title` is what is shown in the drop down, while `value` is what is output in the template.\n\ne.g.\n\n```\ntt_content.call_to_actions {\n\tclasses.type {\n\t\t2 {\n\t\t\ttitle = Highlight\n\t\t\tvalue = highlightCTA\n\t\t}\n\t}\n}\n```\n\n### Relating to records\n\n**_Note_:** Experience in overriding TCAs is required for this\n\nIf 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.\n\nIn the example below, a field is added after the `bodytext` on the `tt_news` table\n\n```php\n\u003c?php\n\ndefined('TYPO3_MODE') or die();\n\ncall_user_func(function () {\n\t$columns = [\n\t\t'tx_sitepackage_call_to_actions' =\u003e [\n\t\t\t'label' =\u003e 'LLL:EXT:call_to_actions/Resources/Private/Language/locallang.xlf:call_to_actions',\n\t\t\t'config' =\u003e [\n\t\t\t\t'default' =\u003e '12',\n\t\t\t\t'type' =\u003e 'select',\n\t\t\t\t'renderType' =\u003e 'selectMultipleSideBySide',\n\t\t\t\t'foreign_table' =\u003e 'tx_calltoactions_domain_model_calltoactions',\n\t\t\t\t'foreign_table_where' =\u003e 'AND tx_calltoactions_domain_model_calltoactions.sys_language_uid IN (-1,0)\n\t\t\t\t\tORDER BY tx_calltoactions_domain_model_calltoactions.title ASC',\n\t\t\t\t'minitems' =\u003e 0,\n\t\t\t\t'maxitems' =\u003e 100,\n\t\t\t\t'size' =\u003e 10,\n\t\t\t],\n\t\t],\n\t];\n\t\\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addTCAcolumns('tt_news', $columns);\n\t\\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addToAllTCAtypes(\n\t\t'tt_news',\n\t\t'tx_sitepackage_call_to_actions',\n\t\t'',\n\t\t'after:bodytext'\n\t);\n});\n```\n\nNext, add the field to the `ext_tables.sql` file in your `site_package`\n\n```sql\n#\n# Table structure for table 'tt_news'\n#\nCREATE TABLE tt_news (\n\ttx_sitepackage_call_to_actions text,\n);\n```\n\nUpdate the database schema to add the new field.\n\nTo render the promos in your template will depend on how your record is rendered - an example snippet of PHP to do this is:\n\n```php\n$cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);\n\n/**\n * Promos\n */\n// Get the default config\n$ctas = $GLOBALS['TSFE']-\u003etmpl-\u003esetup['tt_content.']['call_to_actions.'];\n// Set the records to be our UIDs\n$ctas['dataProcessing.']['100.']['uidInList'] = $record['promos'];\n// Remove the field gathering\nunset($ctas['dataProcessing.']['100.']['uidInList.']);\n// Render the element\n$record['promos'] = $cObj-\u003ecObjGetSingle('FLUIDTEMPLATE', $ctas);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquidlight%2Ftypo3-call-to-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliquidlight%2Ftypo3-call-to-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliquidlight%2Ftypo3-call-to-actions/lists"}