summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCristi <cristi@tom.ro>2023-11-09 23:20:47 +0200
committerGitHub <noreply@github.com>2023-11-09 16:20:47 -0500
commit798a32b1e8c8d8986a00253c54898a6d001a33e1 (patch)
tree4b122e39c69f856a11c8d0c50f678b55a38078f4
parent4f75a3812306c17a7a89561132624113aad76bd4 (diff)
downloadhtmx-798a32b1e8c8d8986a00253c54898a6d001a33e1.tar.gz
htmx-798a32b1e8c8d8986a00253c54898a6d001a33e1.zip
documentation update php symfony (#1978)
* docs: php (symfony sdk) * docs: twig support for fragments --------- Co-authored-by: Cristian Toma <cristian.toma@vivre.eu>
-rw-r--r--www/content/essays/template-fragments.md1
-rw-r--r--www/content/server-examples.md4
2 files changed, 5 insertions, 0 deletions
diff --git a/www/content/essays/template-fragments.md b/www/content/essays/template-fragments.md
index bdb23f8e..9699edb3 100644
--- a/www/content/essays/template-fragments.md
+++ b/www/content/essays/template-fragments.md
@@ -143,6 +143,7 @@ Here are some known implementations of the fragment concept:
* PHP
* [Latte](https://latte.nette.org/en/template-inheritance#toc-blocks) - Use the 3rd parameter to only render 1 block from the template - `$Latte_Engine->render('path/to/template.latte', [ 'foo' => 'bar' ], 'content');`
* [Laravel Blade](https://laravel.com/docs/10.x/blade#rendering-blade-fragments) - includes built-in support for template fragments as of v9.x
+ * [Twig](https://twig.symfony.com/doc/3.x/api.html#rendering-templates) - `$template->renderBlock('block_name', ['the' => 'variables', 'go' => 'here']);`
* Python
* [Django Render Block Extension](https://pypi.org/project/django-render-block/) - see [example code for htmx](https://github.com/spookylukey/django-htmx-patterns/blob/master/inline_partials.rst)
* [jinja2-fragments package](https://github.com/sponsfreixes/jinja2-fragments)
diff --git a/www/content/server-examples.md b/www/content/server-examples.md
index 21da2c3e..cbeb41c9 100644
--- a/www/content/server-examples.md
+++ b/www/content/server-examples.md
@@ -138,6 +138,10 @@ These examples may make it a bit easier to get started using htmx with your plat
- <https://github.com/michalsn/codeigniter-htmx-demo>
+### Symfony
+
+- <https://github.com/tomcri/htmxfony>
+
## Elixir
### Phoenix