Simple faq to your app (no user entry). Question can be associated to Page, see usage.
Initially dev to be use with PiedWeb CMS.
Via Packagist :
# Get the Bundle
composer require piedweb/faq-bundle
# Install the admin
# Edit your config/package/sonata_admin.yaml
# Add :
sonata_admin:
...
...
...
items:
...
- piedweb.admin.faq
... to have a page with a faq.
/!\ Not ready yet, controller not finished (not started in fact)
# Load form in ajax
<div data-sky="{{ path('piedweb_cms_faq') }}"></div>
# Render form in Controller
{{ render(controller('PiedWeb\\FaqBundle\\Controller\\FaqController::show')) }}
... add it to each page of your website by extending your Page
Entity with PiedWeb\FaqBundle\Entity\PageFaqTrait
, adding in the constructor $this->__construct_faq();
And adding this in your template:
{% include '@PiedWebFaq/faq/_faq.html.twig' %}
- test
- controller
Check coding standard before to commit :
php-cs-fixer fix src --rules=@Symfony --verbose
php-cs-fixer fix src --rules='{"array_syntax": {"syntax": "short"}}' --verbose
MIT (see the LICENSE file for details)