Elefant 2.2.6 released
Elefant 2.2.6 has been released with easier website editing for marketing-oriented pages, Docker support, and a number of smaller improvements, bug fixes, and increased security.
Click here to download or update.
Column layouts
This feature builds on the recent improvements to the blocks/group handler and adds the ability to define column layouts for each content row when row=on is set.
To try it out, add the following to your layout template:
{! blocks/group?wildcard=[id]-*&rows=on !}
This tag turns a page into an expandable set of rows of content blocks, which can now also contain up to 5 columns of content.
You'll see a new Content Layout button next to the up/down arrows in the block edit buttons. The buttons in the first column now control the properties for the entire row, and each column now has its own edit button too.
When you click this new button, or when you click the Add Block button to add another row of content, you'll be shown the following options for content layouts:
The layout can also be modified through the block add/edit forms sidebar:
And finally, you can tab between the rows just above the wysiwyg editor, so you can edit an entire row from the same form:
Docker support
Elefant now includes Docker configurations for building production and development containers, as well as a docker-compose file for spinning up a complete development environment in a single command which includes a MySQL database and Redis-backed caching.
To build a production container from a fresh clone of the Elefant repository, run:
$ make build
This will build a container named elefant. Similarly, you can build a development container via:
$ make dev
This will build a container named elefant-dev.
To spin up a development environment (after running make dev), run:
$ make run
And to shut it down, run:
$ make down
Take a look at the included docker-compose.yml and .docker/* files for more info.
Other improvements
Added ELEFANT_DEFAULT_PASS environment variable for ./elefant install command line installer
When you change the ID of a page that uses blocks/group as shown above, Elefant will update the block IDs so they don't become unlinked from the page
You can now load scripts asynchronously via $page->add_script ('/apps/myapp/js/script.js', 'async')
Updated CSRF validation to use sha256 and to use separate expiring tokens per request URI
Added User::error() to get the underlying reason for an authentication failure (e.g.,incorrect credentials, too many tries, database error)
Added pretty printing of JSON output in ./elefant api/get and ./elefant api/post command output
Added setting to opt-out of FLoC tracking under Site Settings, with the opt-out enabled by default
Added |comma filter to template variables, which outputs the value followed by a comma only if the value isn't empty
Bug fixes
Ensure block list in blocks/group is always an array to prevent errors
Auto-update wildcard block IDs when page IDs change
Fixed jGrowl's missing source map
Fixed error in ./elefant permissions command due to missing folder
Remove uploaded files from cache after import in blog app (Wordpress, Blogger, CSV)
File manager strips .php, .phtml, and .ht* files from unzipped folders for improved security
Prevent using base64 encoding to bypass function filter in designer app (e.g., {{base64_decode('cGhwaW5mbw==')()}})
















