687 search results

13 lines | assets/app.js
// ... line 1
// import '@hotwired/turbo';
// ... lines 3 - 13
See Code Block in Script
I see Turbo adds it, sadly I didn't find a way to configure Turbo not to add the styles. You can only override them. An alternative solution would be to remove it via JS, but I think is just better to override the styles
MolloKhan
MolloKhan
Read Full Comment
Hello, To do activate Turbo in my web, do I have to add stimulus controller to any element? In my my web page, I did not connect stimulus controller to any element. I see turbo is not working now. is it normal? thank you
50 lines | assets/app.js
// ... lines 1 - 43
document.addEventListener('turbo:render', () => {
initFlowbite();
});
document.addEventListener('turbo:frame-render', () => {
initFlowbite();
});
See Code Block in Script
Hey Aries, Turbo tutorial is released: https://symfonycasts.com/screencast/turbo - and we do talk about Mercure there :) Enjoy! Also, feel free to use our advanced search to find more related content in other tutorials, e.g. [this](https://symfonycasts.com/search?q=mercure&sort=most%20relevant…
7 lines | templates/voyage/_delete_form.html.twig
<form method="post" data-turbo-frame="_top" action="{{ path('app_voyage_delete', {'id': voyage.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
// ... lines 2 - 5
</form>
See Code Block in Script
123 lines | src/Controller/VoyageController.php
// ... lines 1 - 13
use Symfony\UX\Turbo\TurboBundle;
// ... lines 15 - 16
class VoyageController extends AbstractController
{
// ... lines 19 - 27
public function new(Request $request, EntityManagerInterface $entityManager): Response
{
// ... lines 30 - 33
if ($form->isSubmitted() && $form->isValid()) {
// ... lines 35 - 39
if ($request->headers->has('turbo-frame')) {
$request->setRequestFormat(TurboBundle::STREAM_FORMAT);
return $this->renderBlock('voyage/new.html.twig', 'stream_success', [
'voyage' => $voyage
]);
}
// ... lines 47 - 48
}
// ... lines 50 - 54
}
// ... lines 56 - 121
}
See Code Block in Script
42 lines | assets/app.js
// ... lines 1 - 20
document.addEventListener('turbo:load', () => {
// View Transitions don't play nicely with Turbo cache
// if (shouldPerformTransition()) Turbo.cache.exemptPageFromCache();
});
// ... lines 25 - 42
See Code Block in Script
I'm using Turbo frames, and I get weird behavior with the back button on the browser. I use turbo-advance to change the URL, and that works well enough, but when I go back, the navbar that isn't in the main frame stops…
26 lines | assets/controllers.json
{
"controllers": {
// ... lines 3 - 12
"@symfony/ux-turbo": {
"turbo-core": {
"enabled": true,
"fetch": "eager"
},
"mercure-turbo-stream": {
"enabled": false,
"fetch": "eager"
}
}
},
// ... line 24
}
See Code Block in Script
41 lines | importmap.php
// ... lines 1 - 15
return [
// ... lines 17 - 36
'@hotwired/turbo' => [
'version' => '7.3.0',
],
];
See Code Block in Script
8 lines | assets/app.js
import * as Turbo from '@hotwired/turbo';
// ... lines 2 - 5
//Turbo.session.drive = false;
// ... lines 7 - 8
See Code Block in Script
16 lines | assets/controllers.json
{
"controllers": {
"@symfony/ux-turbo": {
"turbo-core": {
"enabled": true,
"fetch": "eager"
},
// ... lines 8 - 11
}
},
// ... line 14
}
See Code Block in Script
34 lines | importmap.php
// ... lines 1 - 15
return [
// ... lines 17 - 29
'@hotwired/turbo' => [
'url' => 'https://cdn.jsdelivr.net/npm/@hotwired/turbo@7.3.0/+esm',
],
];
See Code Block in Script
{
"controllers": {
"@symfony/ux-turbo": {
"turbo-core": {
"enabled": true,
"fetch": "eager"
},
"mercure-turbo-stream": {
"enabled": false,
"fetch": "eager"
}
}
},
"entrypoints": []
}
See Code Block in Script
Hi, when using "Turbo Frames": If we click to display the details of a mix, the route "/browse" cannot display the data because it is a hyperlink There will be no redirect from the "/browse" route to the "/mix/url_of_mix" route.
I get that turbo is used to make the page more SPA like, but how is that different from a full page refresh? There's no pre-loading, sure it keeps the console state etc, but it still takes time to load the page from…
As symfony/ux-turbo-mercure has been abandoned (files are located in symfony/ux-turbo), you now should run `composer req symfony/mercure-bundle` instead. Also, set `enabled` to `true` in assets/controllers.json for the mercure-turbo-stream config.
Hello, Are your turbo-frames nested? ```twig ... ```
Hi, I installed turbo and I get this error: `DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "turbo-frame" has already been used with this registry`