Skip to content

Commit

Permalink
Update install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Nov 21, 2014
1 parent f1f2a30 commit 54b07f7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Resources/doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,26 @@ public function registerBundles()
...
}
```

### Use the bundle

Add the following in your pagelayout template to output the Open Graph meta tags:

```twig
{% if content is defined %}
{{ render_netgen_open_graph( content ) }}
{% endif %}
```

Alternatively, you can use `get_netgen_open_graph( content )` to just return the tags
and render them manually, for example:

```twig
{% if content is defined %}
{% set metaTags = get_netgen_open_graph( content ) %}
{% for metaTag in metaTags %}
<meta property="{{ metaTag.tagName|trim }}" content="{{ metaTag.tagValue|trim }}" />
{% endfor %}
{% endif %}
```

0 comments on commit 54b07f7

Please sign in to comment.