When I added alpine.js in Bricks builder - Bricks builder doesn’t render text inside. Maybe rendering can be improved?
Hi zim,
a couple of question to better let the team help you:
- How do you added alpine.js?
- Code element
- Bricks Builder > Settings > Page Settings > Custom Code > Scripts
- wp_enqueue_script in child theme
- What do you mean with “text attribute” and “Bricks builder doesn’t render text inside”?
It would be gold if you could provide a Jam video screencast or at least some screenshots to better tackle this.
Jacopo
Hi Jacopo
In the new version Bricks 1.10 you removed ability to insert script teg.
for example:
In version Bricks 1.9 if I want to quickly add alpine.js or htmx I can quickly add this script in Code element. That’s why I like Bricks, it does not create barriers.
Now I can’t do this in version Bricks 1.10.
It’s still possible in Settings - Custom Code - Scripts. But why build barriers? Maybe make a switch in the menu: Do I want to write tags myself or Bricks do it instead of me?
I took an simple example “Start Here” from Start Here — Alpine.js
and use for this Heading elementThank you for your report @zim, We will improve <script>
handling in the JavaScript code control in the 1.10 stable release. There is an issue with the beta version where <script>
tags with attributes are not parsed correctly.
Thanks Tresorama, you’re right.
I didn’t think about it. In this situation that’s even more correct or add a link to the Settings - header, or like this. So in In the new version Bricks 1.10 everything is fine with Code element.
Beta version are launched to the community in order to polish the final release using real user feedback. This tactic ensures the new feature are aligned with real user expectation.
Coming back to topic…
As you’ve probably noticed, the “PHP & HTML” section of the new “Code” element is what the old “Code” element was, so you can continue to use it .
You could still use PHP section alone if you would simulate writing a PHP only file, using the power of PHP templating language (injecting dynamic value in JS script based on Server state for example).
Jacopo
when will 1.10 be available for us all?
Hi guys,
We’ve fixed this issue in Bricks 1.10, now available as a one-click update in your WordPress Dashboard.
You can see the full changelog here: Bricks 1.10 Changelog – Bricks
Please let us know if you are still experiencing issues.
Note that when adding custom tags, it’s still better to add them in the PHP & HTML field.
Best regards,
M