{"id":22164602,"url":"https://github.com/node-link/cakephp-smarty","last_synced_at":"2025-03-24T16:12:19.934Z","repository":{"id":57027982,"uuid":"105841210","full_name":"node-link/cakephp-smarty","owner":"node-link","description":"Smarty plugin for CakePHP","archived":false,"fork":false,"pushed_at":"2018-09-21T15:09:21.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T21:33:49.568Z","etag":null,"topics":["cakephp","cakephp-plugin","smarty"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-link.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-05T02:25:48.000Z","updated_at":"2019-06-02T23:12:48.000Z","dependencies_parsed_at":"2022-08-23T16:20:40.918Z","dependency_job_id":null,"html_url":"https://github.com/node-link/cakephp-smarty","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-smarty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-smarty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-smarty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-link%2Fcakephp-smarty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-link","download_url":"https://codeload.github.com/node-link/cakephp-smarty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245304873,"owners_count":20593626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cakephp","cakephp-plugin","smarty"],"created_at":"2024-12-02T05:08:56.624Z","updated_at":"2025-03-24T16:12:19.917Z","avatar_url":"https://github.com/node-link.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smarty plugin for CakePHP\n\nThe Smarty plugin is a simple way to install Smarty view on your CakePHP 3 application with 3 steps.\n\n## Requirements\n\n* CakePHP 3.x\n* PHP 5.5+\n\n## Installation\n\n### 1. Install plugin\n\nYou can install this plugin into your CakePHP application using [composer](http://getcomposer.org).\n\nThe recommended way to install composer packages is:\n\n```bash\ncomposer require node-link/cakephp-smarty\n```\n\n### 2. Load plugin\n\nUse `bin/cake` to load the plugin as follows:\n\n```bash\nbin/cake plugin load NodeLink/Smarty\n```\n\nOr, manually add the following to `config/bootstrap.php`:\n\n```php\n\u003c?php\nuse Cake\\Core\\Plugin;\n\nPlugin::load('NodeLink/Smarty');\n```\n\n### 3. Set View class\n\nIn the `AppController.php` of your application, specify the View class.\n\n```php\n\u003c?php\nnamespace App\\Controller;\nuse Cake\\Controller\\Controller;\nuse Cake\\Event\\Event;\n\nclass AppController extends Controller\n{\n    public function beforeRender(Event $event)\n    {\n        $this-\u003eviewBuilder()-\u003esetClassName('NodeLink/Smarty.App');\n\n        // Prior to CakePHP 3.4.0\n        $this-\u003eviewBuilder()-\u003eclassName('NodeLink/Smarty.App');\n    }\n}\n```\n\n## Configuration\n\nIf you want to change Smarty's behavior, you can change Smarty's behavior by writing `config/app.php` as follows.\n\n```php\n\u003c?php\nreturn [\n    // Add the following\n    'Smarty' =\u003e [\n        'debugging' =\u003e true,                            // Default: Configure::read('debug')\n        'auto_literal' =\u003e true,                         // Default: true\n        'escape_html' =\u003e true,                          // Default: false\n        'left_delimiter' =\u003e '\u003c!--{',                    // Default: '{'\n        'right_delimiter' =\u003e '}--\u003e',                    // Default: '}'\n        'error_reporting' =\u003e E_ALL \u0026 ~E_NOTICE,         // Default: null\n        'force_compile' =\u003e true,                        // Default: Configure::read('debug')\n        'caching' =\u003e Smarty::CACHING_LIFETIME_CURRENT,  // Default: false\n        'cache_lifetime' =\u003e 86400,                      // Default: 3600\n        'compile_check' =\u003e true,                        // Default: true\n        'compile_dir' =\u003e null,                          // Default: CACHE . 'views'\n        'cache_dir' =\u003e null,                            // Default: CACHE . 'smarty'\n        'config_dir' =\u003e null,                           // Default: CONFIG . 'smarty'\n        'plugins_dir' =\u003e null,                          // Default: CONFIG . 'smarty' . DS . 'plugins'\n        'template_dir' =\u003e null,                         // Default: APP . 'Template'\n        'use_sub_dirs' =\u003e false,                        // Default: false\n    ],\n];\n```\n\nIf the setting item is not filled out or null is set, the default value is used.\n\nIf you want to define plugins such as functions and modifiers, `config/smarty/plugins` is the plugins directory by default, so place the plugins in `config/smarty/plugins`.\n\n## Reporting Issues\n\nIf you have a problem with the Smarty plugin, please send a pull request or open an issue on [GitHub](https://github.com/node-link/cakephp-smarty/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-link%2Fcakephp-smarty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-link%2Fcakephp-smarty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-link%2Fcakephp-smarty/lists"}