Skip to content

Commit

Permalink
Merge pull request #201 from delyriand/fix/update-link-example
Browse files Browse the repository at this point in the history
Re-add the template in dist to display product description and update example links in README
  • Loading branch information
jacquesbh authored Jun 22, 2023
2 parents c7f3106 + 19f8a20 commit ec17356
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bin/console asset:install
### Update your form type

To make a field use the rich editor, you must use the `RichEditorType` type for it.
We have an example of implementation in the [test application](/tests/Application/src/Form/Extension/ProductTypeExtension.php).
We have an example of implementation in the [file for the test application](/dist/src/Form/Extension/ProductTypeExtension.php).

If your field has some data already, like some previous text before installing this plugin,
then we will convert it for you as an HTML Element which contains… HTML.
Expand All @@ -80,7 +80,7 @@ To display the content of the rich editor field you must call the twig filter:
{{ content | monsieurbiz_richeditor_render_field }}
```

You can see an example in the [test application](/tests/Application/templates/bundles/SyliusShopBundle/Product/Show/Tabs/Details/_description.html.twig)
You can see an example in the [file for the test application](/dist/templates/bundles/SyliusShopBundle/Product/Show/Tabs/Details/_description.html.twig)

### Custom rendering of elements

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% if product.description is not empty %}
{{ product.description | monsieurbiz_richeditor_render_field }}
{% else %}
{{ 'sylius.ui.no_description'|trans }}.
{% endif %}

0 comments on commit ec17356

Please sign in to comment.