Skip to content

Commit

Permalink
Update override_template.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanlaak authored Nov 17, 2021
1 parent 3bd29a8 commit 8ab08fa
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Resources/doc/override_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ You can override the default template in many ways.

```yaml
apy_breadcrumb_trail:
template: APYBreadcrumbTrailBundle::breadcrumbtrail.html.twig
template: @APYBreadcrumbTrail/breadcrumbtrail.html.twig
```
- You can define the template in a breadcrumb annotation:
- You can define another template in a breadcrumb annotation:
```php
/**
* @Breadcrumb("My breadcrumb", route="my_route")
* @Breadcrumb(template="APYBreadcrumbTrailBundle::breadcrumbtrail.html.twig")
* @Breadcrumb(template="@APYBreadcrumbTrail/breadcrumbtrail.html.twig")
*/
```

Or

```php
/**
* @Breadcrumb("My breadcrumb", route="my_route", template="APYBreadcrumbTrailBundle::breadcrumbtrail.html.twig")
* @Breadcrumb("My breadcrumb", route="my_route", template="@APYBreadcrumbTrail/breadcrumbtrail.html.twig")
*/
```

Expand All @@ -35,11 +35,11 @@ Or
/**
* @see \APY\BreadcrumbTrailBundle\BreadcrumbTrail\Trail::setTemplate()
*/
$trail->setTemplate('APYBreadcrumbTrailBundle::breadcrumbtrail.html.twig');
$trail->setTemplate('@APYBreadcrumbTrail/breadcrumbtrail.html.twig');
```

- You can define the template when you render the breadcrumb trail in your twig file:

```twig
{{ apy_breadcrumb_trail_render('APYBreadcrumbTrailBundle::breadcrumbtrail.html.twig') }}
```
{{ apy_breadcrumb_trail_render('@APYBreadcrumbTrail/breadcrumbtrail.html.twig') }}
```

0 comments on commit 8ab08fa

Please sign in to comment.