https://twill.io logo
Join Discord
Powered by
# ❓questions
  • e

    elkex

    12/08/2022, 3:16 PM
    Do you mean this function?
  • i

    ifox

    12/08/2022, 5:23 PM
    getFormFields
  • d

    dakaalim

    12/09/2022, 2:48 AM
    I have a block called
    Team
    , within this block, you can add repeater blocks
    Team Item
    . On the frontend, I want use div tags to wrap around all the repeater blocks, but how do you know detect when to render the opening and ending tag?
  • d

    dakaalim

    12/09/2022, 2:51 AM
    Above is the preview mode on twill admin, I'm trying to use div tag to wrap all the
    Team Item
    repeater blocks, so I can style a css container around it.
  • d

    dakaalim

    12/09/2022, 2:55 AM
    I tried to use blade syntax such as
    @if($loop->first)
    or
    @if($loop->last)
    on
    site\blocks\team-item.blade.php
    but it did not work as expected.
  • d

    dakaalim

    12/09/2022, 3:01 AM
    Some people might suggest adding the css container in
    site\layouts\block.blade.php
    but that's not what I want
  • k

    Kendrickt

    12/09/2022, 4:59 AM
    Hi, I am trying out the nested block function. May i ask how do i set different option for parent block and child block? Here is my form fields ModuleController:
    Copy code
    public function getForm(TwillModelContract $model): Form
        {
            $form = parent::getForm($model);
    
            $form[] = Input::make()->name('description')->label('Description')->translatable();
            $form[] = BlockEditor::make()->blocks(['expand_collapse']);
            return $form;
        }
    expand_collapse block
    Copy code
    @twillBlockTitle('Expand and Collapse')
    @twillBlockIcon('text')
    
    <x-twill::input name="header" label="Header" :maxlength="100" :required="true" />
    
    <x-twill::block-editor
        :blocks="['collapse_block']"
    />
  • b

    BA7YA

    12/09/2022, 10:13 AM
    Hi guys! Do we have any info about my problem? https://github.com/area17/twill/issues/1957
  • i

    ifox

    12/10/2022, 12:38 PM
    Hi @BA7YA sorry for the delay, it was a very busy week and we had some people out sick. Next week we'll make sure to look at it.
  • b

    BA7YA

    12/10/2022, 1:03 PM
    Thank you very much for update!) I glad to hear that you didn’t forget about me)
  • e

    elkex

    12/12/2022, 10:23 AM
    I managed to get the User model data inside my form! Only thing I need to be able to do is make it editable
  • e

    elkex

    12/12/2022, 11:15 AM
    I managed to do the full frontend user management from the Twill backend, * yeah! haha :p
  • e

    elkex

    12/12/2022, 12:55 PM
    One last issue is that every time I log in on the frontend of my user instance, it creates a new profile instance...
  • e

    elkex

    12/12/2022, 1:38 PM
    Why does the superuser I created on installation of Twill not appear under my Twill CMS users? Is it because I'm signed in with that account?
  • i

    ifox

    12/12/2022, 1:39 PM
    superadmins are hidden from the users list, only you can edit your own settings as a superadmin
  • e

    elkex

    12/12/2022, 1:40 PM
    Ok, but is it possible to create another superadmin from the CMS?
  • i

    ifox

    12/12/2022, 1:44 PM
    no
  • i

    ifox

    12/12/2022, 1:45 PM
    admin role has all the same permissions as superadmin, except for impersonation
  • i

    ifox

    12/12/2022, 1:46 PM
    and you can't apply any custom permission to a superadmin, they bypass every policies
  • h

    Harings Rob

    12/12/2022, 2:11 PM
    I think you can create another one using the cli?
  • i

    ifox

    12/12/2022, 3:16 PM
    of course yeah
  • e

    elkex

    12/13/2022, 1:14 PM
    Does a repeater field always have to be inside a block_editor field?
  • h

    Harings Rob

    12/13/2022, 1:15 PM
    No it can be placed anywhere
  • e

    elkex

    12/13/2022, 1:16 PM
    I cannot seem to render it.. Does the item of the repeater field have to be connected to a model even though it only contains a string input field?
  • e

    elkex

    12/13/2022, 1:16 PM
    https://twill.io/docs/block-editor/adding-repeater-fields-to-a-block.html I did this and then I added the repeater form field to my page form field but it does not show
  • h

    Harings Rob

    12/13/2022, 1:17 PM
    the repeater is not rendering in the cms or in the front-end?
  • e

    elkex

    12/13/2022, 1:18 PM
    CMS
  • e

    elkex

    12/13/2022, 1:19 PM
    Now it is showing but not saving hm..
  • e

    elkex

    12/13/2022, 1:19 PM
    Does it have to be connected to a model?
  • e

    elkex

    12/13/2022, 1:22 PM
    It only saves if it is inside a block_editor field...
1...436437438...484Latest