TC
Twill CMShuuvien17

Select an another block in a block?

Hi everyone, I have a function to create a new block with name "Columns block". With this block, user can create a new content row with multiple column. And after that, user can select a specific block (it will dynamic with all block already had in system) that they want to show in column. Can Twill already support this function?
ifox
ifox•423d ago
Hi @huuvien17 nested blocks (as in, putting a block_editor field inside a block form) are supported in twill 3, but I think you're asking for something else, I'm not sure.
huuvien17
huuvien17•423d ago
Hi @ifox.dev thanks for your reply. I put this question because I am using Twill v2. So let's me try to use v3. If not I will ask you later. 🤗
ifox
ifox•423d ago
In twill 2 an option is to use a repeater with a conditional field but it requires a lot of duplication if you want all your blocks to be also available in a repeater form that's why twill 3 introduced nested blocks
huuvien17
huuvien17•423d ago
I already used repeater in Twill v2 but I not same with my expectation. Repeater will repeat a specific a static block/content. But in my case, I need a dynamic for some selecting
ifox
ifox•423d ago
that's why I said with a conditional field. It would be a select labelled "block type" for example, and depending on the value of that select you would show the appropriate fields
huuvien17
huuvien17•423d ago
Sorry, I don't understand this labelled "block type" you are mentionning. Is it a field of the repeater of v2?
ifox
ifox•423d ago
That was just an example select field label you would use to let the user select one of the block type you want them to be able to put in that column but let's step back, i think we're talking about different things do you want users to be able to create a block from scratch in those columns, or do you want them to select a block with its content already created in another record?
huuvien17
huuvien17•423d ago
In my case, I need create a new block (maybe it have 3 columns in layouts). User can drag/drop it in block editor window. And after that, user can drag/drop an another block (example select 1 text block for first column, and 1 image block for second column...etc) for each column in the dropped block that I mentioned above.
huuvien17
huuvien17•423d ago
@ifox.dev In my case, it look like that. From 0:22 -> 01:00 https://youtu.be/xiOzEz0tJcY?t=22
Jamie Marsland
YouTube
Awesome Columns and Grids using the WordPress Block Editor and Gute...
Columns and Grids are the cornerstone of web design but the Gutenberg Block Editor Column Block is somewhat limited. That's where the Gutenberg Pro plugin comes in. Gutenberg Pro adds a whole bunch of extra options to the core Columns Block to make it a really poweful page layout tool. Here's a link to Gutenberg Pro (free 14 day trial availa...
ifox
ifox•423d ago
ok yeah so definitely nested block editors in Twill 3 solve for that. what I was saying is that on Twill 2 you can artificially do this using a column repeater inside a block. The field in the column repeater would be something like - column content type (select): text/image/video/etc... - if the column content type is text, show the fields you need for a text block - if the column content type is image, show the fields you need for an image block - and so on https://twill.io/docs/form-fields/conditional-fields.html
huuvien17
huuvien17•423d ago
Yay, it is so amazing!! Thanks for your time. I will upgrade for v3. Thank you again 🤗
Want results from more Discord servers?
Add your server
More Posts
Media Library / Glide only loading JPEGsHey there, So I had a Laravel/Twill app running successfully on a subdomain with no issue. Today IAdding a vue componentGood afternoon Tell me what could be the problem? On the main page of the admin panel there is an aSave title in translationsI'm trying to save my title as a translatable field, normal fied works fine but when i make it transSet translations to activeWhile trying to set translations to active it isn't saved to database? Only english is selectablecan't use Published, Draft, Trash filters on module indexI see the buttons, they show the correct counts in the parenthesis, but when I click on them, I alwamedias XHR request with wrong schemeGreetings... I'm having trouble with accessing media library in the admin area in production. Mixeremove positioning and nesting from the page indexGood morning. Tell me how to remove positioning and nesting from the page index in the admin panel? Connecting additional fields depending on the value in the record when selected in the browser compoGood morning. Can you tell me if it is possible to implement the doing in twill? I have a browser iCustom function in a Module ControllerI need to trigger a custom function that is run after a user clicks "Update" for a post in a Twill mTiptap WYSIWYGHi everyone, I would like to know if there is a way to use toolbar align options with tiptap type wySorting by a translation field (ie, title)Hi everyone, I feel like I must be missing something simple (as usual) or am making something overlyProblem with displaying headers if the site is in two languagesGood morning. I decided to look at twill 3 version. I use two languages (ru-main, en-I want to add Issuing rights to upload to the media libraryGood afternoon! Tell me how to give the right dip for the defined role to upload files / images to tAttribute [singleton] does not exist.Hello there im working in a twill website,and i got this error , can you help me sloving this error Disable live - draftAny way to disable this feature on forms? Have tried multiple things, but non of it seems to work.output selected blocks on the front in different placesGood afternoon! Tell me how you can draw blocks on the front selectively? Example Block 1 text teDeleting an entry causes 500 error unless entry is destroyedBeen struggling with this for a bit and I'm out of ideas. I've got a browser that contains a list ofBrowser route for sub-menu (primary navigation)How to setup a browser connected to a module outside of the navigation group? See images for clarifGet link to file in media libraryGood afternoon guys. Tell me how you can add the output of links to files when loading in the librarBrowser fields the id of the object doesn't saveBrowser options show list with logo and name, gets attached correctly including logo and name. When