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

    elkex

    12/06/2022, 10:09 AM
    Is it possible to also add a caption field to the backend for files and not only for media (image) files?
  • k

    kalle

    12/06/2022, 10:28 AM
    With the current setup, no. But it can be improvised.
  • e

    elkex

    12/06/2022, 10:33 AM
    Improvised how? I found the docu about the custom metadata for the media library but not the file library unfortunately..
    k
    i
    • 3
    • 39
  • e

    emil

    12/06/2022, 3:21 PM
    .. this link is broken .. anyone has an idea where to find this article?
  • i

    ifox

    12/06/2022, 3:55 PM
    unfortunately Github decided to redirect it and broke all of it even though they previously said they would keep it only as read-only...
  • k

    kalle

    12/06/2022, 3:57 PM
    https://discord.com/channels/811936425858695198/1041824923741585488 Check this thread
  • d

    DKC

    12/07/2022, 7:01 AM
    can help on this?
  • k

    kalle

    12/07/2022, 9:23 AM
    I would like to help, but I dont understand your problem.
  • d

    DKC

    12/07/2022, 9:23 AM
    In short, I would like to make the slug translatable=false.
    k
    i
    • 3
    • 22
  • d

    DKC

    12/07/2022, 9:24 AM
    Oh, I have a typo in my question
  • e

    elkex

    12/08/2022, 8:53 AM
    Is it possible to get the fileables from a file?
  • k

    kalle

    12/08/2022, 8:56 AM
    From your own model?
  • e

    elkex

    12/08/2022, 8:57 AM
    I want to do the opposite.. I want to know in what model I'm loading a file.. Could do it with a DB:: query ofc, but was wondering if there was already something in Twill
  • h

    Harings Rob

    12/08/2022, 9:01 AM
    @elkex I think something like this? https://github.com/area17/twill/pull/1019
  • k

    kalle

    12/08/2022, 9:03 AM
    Are you alive man, good to see you back! 😄
  • e

    elkex

    12/08/2022, 9:14 AM
    Nice! Is this already in use?
  • h

    Harings Rob

    12/08/2022, 9:24 AM
    no it's an open pr that needs to still be worked on in 3.x, but you could look at the code as there's examples on how to get what you need I think?
  • e

    elkex

    12/08/2022, 10:07 AM
    It works
  • k

    Kendrickt

    12/08/2022, 10:12 AM
    Hi I have a question about the preview function. In the Block Editor, the editor can only show the changes of block, the repeater item will remain the same even if I add or changes them. In the module preview function, also cannot show the changes of blocks Is the preview function under development?
  • i

    ifox

    12/08/2022, 10:24 AM
    Hi, it's not under development, you're making assumptions about it that are wrong because of what you're seeing, probably due to how you're rendering them. Can you share more about how you are rendering repeaters within your blocks?
  • k

    Kendrickt

    12/08/2022, 10:32 AM
    Thanks for the reply, here is my block template.
    Copy code
    <div>
        <div>
            <h2>{{ $block->input('header') }}</h2>
            {{-- aria-label="{{ $block->input('expandBtnText') ?? 'Expand All' }}">{{ $block->input('expandBtnText') ?? 'Expand All' }}</a> --}}
        </div>
        <div id="{{ $block->type }}{{ $block->id }}">
            @foreach ($block->children as $list)
                <div >
                    <div >
                        <button role="button">
                            {{ $list->input('title') }}
                        </button>
                    </div>
                    <div id="{{ $list->type }}{{ $list->id }}">
                        <ul >
                            @foreach ($list->children as $list_item)
                                <li>{!! $list_item->input('description') !!}</li>
                            @endforeach
                        </ul>
                    </div>
                </div>
            @endforeach
        </div>
    </div>
  • k

    Kendrickt

    12/08/2022, 10:36 AM
    Sorry if i making wrong assumptions. I asked because i found out that the data from request payload are already resolved. Its just the resolved children repeaters can not access by $block->children.
    i
    • 2
    • 8
  • i

    ifox

    12/08/2022, 10:49 AM
    Repeater previews
  • e

    elkex

    12/08/2022, 11:25 AM
    Is there a way I can address other models to be updateable from the Twill backend? For instance the 'normal' users table.. To maybe change the user data from that backend or create/delete users
  • k

    kalle

    12/08/2022, 11:32 AM
    There is exactly a guide for that https://twill.io/docs/guides/manage_frontend_user_profiles_from_twill.html
  • e

    elkex

    12/08/2022, 11:44 AM
    I love it.
  • e

    elkex

    12/08/2022, 11:54 AM
    Is there a build-in frontend feature for the breadcrumbs? of nested modules? Or is it just looping where possible?
  • k

    kalle

    12/08/2022, 12:01 PM
    For the parent-child nested modules?
  • e

    elkex

    12/08/2022, 12:02 PM
    yes, except it's only one module and I want it in my frontend views, not the CMS
  • k

    kalle

    12/08/2022, 12:17 PM
    You could make something similiar in your frontend controller https://github.com/area17/twill/blob/7dc5380a3ff835e963ad40ab0ee1c076e17389e0/docs/src/crud-modules/nested-modules.md#using-breadcrumbs-for-easier-navigation
1...434435436...484Latest