wxr / content-bundle
Symfony WXRContentBundle
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- symfony/framework-bundle: 2.1.*
- wxr/category-bundle: 1.0.*
This package is not auto-updated.
Last update: 2024-05-11 11:42:55 UTC
README
Installation
Nothing special.
Configuration
WXRContentBundle doesn't require any configuration.
Default configuration
wxr_content: twig: extension: render: default_template: WXRContentBundle::contents.html.twig
Twig extension
WXRContentBundle comes with the wxr_content_render
twig function.
Display contents where "example" is content's name, tag's name or tag's slug:
{{ wxr_content_render("example") }}
Display content by content's name:
{{ wxr_content_render({ name: content_name }) }}
Display contents by tag's name:
{{ wxr_content_render({ "tag.name": tag_name }) }}
Display contents by tag's slug:
{{ wxr_content_render({ "tag.slug": tag_slug }) }}
Display content or array of contents:
{{ wxr_content_render(some_contents) }}
Contents will be rendered by the default template (see Configuration). To override default template, pass it as second parameter:
{{ wxr_content_render(some_contents, 'WXRContentBundle::raw.html.twig') }}