Skip to content

Commit

Permalink
Add example of YAML configuration (#120)
Browse files Browse the repository at this point in the history
* Add example of YAML configuration

* Add example of XML route configuration
  • Loading branch information
bocharsky-bw authored and Yann Eugoné committed Jun 14, 2016
1 parent 3bfffa1 commit 74366eb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,25 @@ Sandbox is also deployed for a live demonstration :
*/
```

Or YAML support:

```php
homepage:
path: /
defaults: { _controller: "AppBundle:Default:index" }
options:
sitemap: true
```

Or XML support:

```xml
<route id="homepage" path="/">
<default key="_controller">AppBundle:Default:index</default>
<option key="sitemap">true</option>
</route>
```

For complexe routes, create a [Closure][3] or a [Service][5] dedicated to your sitemap then add your urls :

```php
Expand Down

0 comments on commit 74366eb

Please sign in to comment.