You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,4 +20,18 @@ Certain configuration variables in ExpressionEngine will be overwritten by your
20
20
21
21
## Accessing ExpressionEngine Config Values
22
22
23
-
After Coilpack bootstraps ExpressionEngine you will be able to access any of your ExpressionEngine `system/user/config.php` values through the Laravel `config()` helper. For example to get your `app_version` you could call `config('coilpack.expressionengine.app_version')` within your Laravel application.
23
+
After Coilpack bootstraps ExpressionEngine you will be able to access any of your ExpressionEngine `system/user/config.php` values through the Laravel `config()` helper. For example to get your `app_version` you could call `config('coilpack.expressionengine.app_version')` within your Laravel application.
24
+
25
+
## Default Template Engine
26
+
27
+
ExpressionEngine 7.5 added a new configuration option to control the site's default template engine. This setting will be considered whenever you create a new template, run a template generator or copy template code for a channel or field.
28
+
29
+
```
30
+
# system/user/config/config.php
31
+
32
+
...
33
+
/*
34
+
* Set the default template engine
35
+
* Default: null (native). Can be 'twig' or 'blade' with Coilpack
Copy file name to clipboardExpand all lines: docs/getting-started.md
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,21 +11,22 @@ Read more about how URLs are handled inside of Coilpack in the [Routing Section]
11
11
If you are new to Laravel and Coilpack we strongly recommend you follow the rest of this guide for getting started. However, if you have installed Coilpack before or are familiar with setting up a Laravel application you can get started quickly with the commands below.
We recommend using the latest version of Laravel whenever possible. The only reason you should not use the latest version is if you are limited to a certain version of PHP. The table below shows which versions of Laravel are supported on different versions of PHP.
22
+
We recommend using the latest version of Laravel whenever possible. The only reason you should not use the latest version is if you are limited to a certain version of PHP. The table below shows which versions of Laravel and Coilpack are supported on different versions of PHP.
@@ -96,15 +97,15 @@ We recommend keeping your version of ExpressionEngine updated to the latest 7.x
96
97
97
98
### Using a New ExpressionEngine Install
98
99
99
-
If you want Coilpack to create a new ExpressionEngine install, it will be placed in an `ee` folder within your Laravel project. You now need to setup ExpressionEngine via the `admin.php` file in your `ee` folder. Example: `http://localhost/admin.php`. Follow the on-screen instructions to finalize your ExpressionEngine install.
100
+
If you want Coilpack to create a new ExpressionEngine install, it will be placed in an `ee` folder within your Laravel project. You now need to setup ExpressionEngine via the installer. The default url is `/admin` for example: `http://localhost/admin`. Follow the on-screen instructions to finalize your ExpressionEngine install.
100
101
101
102
For more help with installing ExpressionEngine reference the [ExpressionEngine Docs](https://docs.expressionengine.com/latest/installation/installation.html).
102
103
103
104
### Using an Existing ExpressionEngine Install
104
105
105
106
If you want to use an existing ExpressionEngine install you will be prompted for a path that is accessible from your Laravel project. The path can be relative or absolute and should point to the root folder of your ExpressionEngine install. You will also be asked for relative paths to system and config folders. The typical locations are provided as default answers but if you have a customized setup it is important to let Coilpack know where to find these directories.
106
107
107
-
After you have linked your site with Coilpack you will need to change the way you access the site. For example if your ExpressionEngine site is located at `https://example.com`, and your Laravel application is setup to be accessed via `https://coilpack.example.com`, after setting up Coilpack you will need to access your ExpressionEngine site via `https://coilpack.example.com` (`https://coilpack.example.com/admin.php` to access the Control Panel).
108
+
After you have linked your site with Coilpack you will need to change the way you access the site. For example if your ExpressionEngine site is located at `https://example.com`, and your Laravel application is setup to be accessed via `https://coilpack.example.com`, after setting up Coilpack you will need to access your ExpressionEngine site via `https://coilpack.example.com` (`https://coilpack.example.com/admin` to access the Control Panel).
108
109
109
110
For the sake of SEO, current links in place, etc, once you decide to use Coilpack for your website, you will probably want to update your webserver to point your site's current URL to your Laravel project. Talk to your webserver admin for information on how to accomplish this.
Coilpack expands support for [ExpressionEngine's Template Generator](https://docs.expressionengine.com/latest/templates/generators.html) feature to include the Twig and Blade templating engines. This is accomplished by providing translations of ExpressionEngine's native template and fieldtype stubs.
4
+
5
+
## Usage
6
+
7
+
### Control Panel
8
+
9
+
The Channel and Field Manager display a shortname next to each item's title which you can click to copy example template code. This code will be generated using the site's [default template engine](/configuration#default-template-engine). If not specified this will use the Native Template Language so be sure to change this if you wish to copy code in Twig or Blade.
10
+
11
+
:::warning
12
+
Due to security restrictions in modern browsers copying code via the shortname is only supported when on HTTPS.
13
+
:::
14
+
15
+
When using Coilpack you will also notice that the `Developer > Templates > Template Generator` page will have an extra option for "Template Engine". You can select from the available options and the generated templates will use the proper syntax for your specified engine.
16
+
17
+
:::info
18
+
If you generate a template that is missing a translated stub (perhaps a third-party fieldtype) ExpressionEngine will default back to the native syntax for that stub.
19
+
:::
20
+
21
+
### Command Line Interface
22
+
23
+
You may access the Template Generator functionality through the Command Line Interface (CLI) as well by running `php artisan eecli generate:templates`. For more information about the available options please consult the [ExpressionEngine Documentation](https://docs.expressionengine.com/latest/templates/generators.html#command-line-usage)
24
+
25
+
## Add-on Development
26
+
27
+
If you are developing an add-on and wish to support Template Generators you should first familiarize yourself with the [Template Generator Service](https://docs.expressionengine.com/latest/development/services/template-generator.html).
28
+
29
+
You can add support for the Twig and Blade templating engines by creating additional stubs in your `addon_name/stubs` folder that use the template engine suffix. For instance if your add-on has a fieldtype your Native template stub might be `addon_name/stubs/field.php` and you could create a variant for Twig at `addon_name/stubs/field.twig.php` and similarly for Blade at `addon_name/stubs/field.blade.php`.
Copy file name to clipboardExpand all lines: docs/upgrade-guide.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,16 @@ You can upgrade to the latest version of Coilpack by running `composer update --
4
4
5
5
## Review the Changelog
6
6
7
-
It's always a good idea to be aware of what is changing in each release. You can see a list of all changes in our [current changelog](https://github.com/ExpressionEngine/Coilpack/blob/1.x/CHANGELOG.md).
7
+
It's always a good idea to be aware of what is changing in each release. You can see a list of all changes in our [current changelog](https://github.com/ExpressionEngine/Coilpack/blob/2.x/CHANGELOG.md).
8
8
9
9
## Configuration Changes
10
10
11
-
Between versions the Coilpack configuration file may change. We recommend comparing the most [recent changes](https://github.com/ExpressionEngine/Coilpack/blob/1.x/config/coilpack.php) with your own `config/coilpack.php` file.
11
+
Between versions the Coilpack configuration file may change. We recommend comparing the most [recent changes](https://github.com/ExpressionEngine/Coilpack/blob/2.x/config/coilpack.php) with your own `config/coilpack.php` file.
12
12
13
13
## Upgrading to 2.0 from 1.x
14
14
15
+
The default value for `admin_url` has been changed from `/admin.php` to `/admin` to avoid routing issues with certain webserver configurations.
16
+
15
17
The GraphQL signature for the Range Slider Fieldtype has changed to allow requesting specific subfields like `value`, `from`, and `to`.
16
18
17
19
`Expressionengine\Coilpack\View\FormTag` has been deprecated in 2.0, so if you were extending this class please be aware and update your subclasses. The new trait `Expressionengine\Coilpack\View\Traits\CreatesHtmlForm` provides similar functionality.
0 commit comments