https://github.com/eosnewmedia/external-layout-bundle
Load and store html layouts from remote locally as twig templates.
https://github.com/eosnewmedia/external-layout-bundle
dom external html layouts php remote symfony symfony-bundle template twig
Last synced: 2 months ago
JSON representation
Load and store html layouts from remote locally as twig templates.
- Host: GitHub
- URL: https://github.com/eosnewmedia/external-layout-bundle
- Owner: eosnewmedia
- License: mit
- Created: 2017-06-08T08:59:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T09:56:18.000Z (over 3 years ago)
- Last Synced: 2025-01-02T23:14:24.104Z (over 1 year ago)
- Topics: dom, external, html, layouts, php, remote, symfony, symfony-bundle, template, twig
- Language: PHP
- Size: 94.7 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
External-Layout-Bundle
======================
[](https://insight.sensiolabs.com/projects/b6266ec0-d13c-4558-8c74-772f97c18da6)
This bundle integrates [enm/external-layout](https://github.com/eosnewmedia/External-Layout) into your symfony project.
## Installation
```sh
composer require enm/external-layout-bundle e-moe/guzzle6-bundle
```
## YAML Confiugration
The YAML configuration ("layouts") equal the array structure from [enm/external-layout](https://github.com/eosnewmedia/External-Layout).
```yaml
enm_external_layout:
useGuzzle: true # default: false; requires a service "GuzzleHttp\ClientInterface" (e.g. e-moe/guzzle6-bundle)
layouts:
test:
source: 'http://example.com'
destination: '%kernel.project_dir%/templates/test.html.twig'
blocks:
prepend:
headline: 'body'
append:
stylesheets: 'head'
replace:
title: '$title$'
```
## Commands
### enm:external-layout:create
This command get the configs and create a twig template file for each configured layout.
```sh
# Create all templates
bin/console enm:external-layout:create
# Create the template "test.html.twig"
bin/console enm:external-layout:create --layout=test
```