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

    Hip-Hop

    12/01/2022, 5:31 AM
    foreach($block->children as $repeater) {
  • b

    BA7YA

    12/01/2022, 7:44 AM
    Hi @Harings Rob I found your issue on GitHub https://github.com/area17/twill/issues/1554 . I have exact the same problem now. Do you have any info or any workaround for this?)
  • h

    Harings Rob

    12/01/2022, 7:44 AM
    Hey, I have not yet investigated this.
  • k

    kalle

    12/01/2022, 1:46 PM
    Wouldnt here be required, if you specificy route to set parent prefix before this? Original
    Copy code
    php
            'primary_navigation' => [
                'seo' => [ // Settings
                    'title' => 'SEO', 
                    'route' => 'admin.settings',
                    'params' => ['section' => 'seo']
                ],
                'translations' => [ // Custom page
                    'title' => 'Translations',
                    'route' => 'admin.translations',
                    'params' => ['section' => 'translations']
                ],
                'siteSetting' => [ // Singleton
                    'title' => 'General Site Settings',
                    'route' => 'admin.siteSetting',
                    'params' => ['section' => 'siteSetting']
                ],
    
            ]
    Expected?
    Copy code
    php
            'primary_navigation' => [
                'seo' => [ // Settings
                    'title' => 'SEO', 
                    'route' => 'admin.settings.settings',
                    'params' => ['section' => 'seo']
                ],
                'translations' => [ // Custom page
                    'title' => 'Translations',
                    'route' => 'admin.settings.translations',
                    'params' => ['section' => 'translations']
                ],
                'siteSetting' => [ // Singleton
                    'title' => 'General Site Settings',
                    'route' => 'admin.settings.siteSetting',
                    'params' => ['section' => 'siteSetting']
                ],
    
            ]
    Just discussing this, havent worked with this kinda of setup. And this is only valid, if its expected for this primary navigation to be under
    settings
    parent, if this is only link to other routes, then its ok.
  • a

    amargoCactus

    12/01/2022, 2:29 PM
    can i override media model? i want to extend it to use GeneaLabs/laravel-model-caching
    k
    p
    e
    • 4
    • 8
  • k

    kalle

    12/01/2022, 2:48 PM
    Extend Media model
  • k

    kalle

    12/01/2022, 5:47 PM
    Any idea how to make index filter per value? Model contains attribute
    locale
    which filter should show on select.
    i
    • 2
    • 22
  • v

    VadimG

    12/01/2022, 6:06 PM
    Hi @Harings Rob ! Do you have plans make revisions incremental?
  • i

    ifox

    12/01/2022, 6:08 PM
    hey @VadimG mind explaining what you mean by that exactly?
  • v

    VadimG

    12/01/2022, 6:09 PM
    Hi @ifox ! Now we saving all page data in revision (widgets data etc). Can we save in revision only changed data? Or smth like this Because if we're updating page when we have small changes - we're saving a lot of repeated data in revisions and revision by revision we have fat DB 🙂 But now I have no idea how we can restore old revisions with incremental way... Maybe check all revisions after selected one, idk
  • i

    ifox

    12/01/2022, 6:16 PM
    I see, ok, yes totally get your point
  • i

    ifox

    12/01/2022, 6:16 PM
    the challenge, as you identified, is restoring
  • i

    ifox

    12/01/2022, 6:17 PM
    because what happens when restoring is that we hydrate the model with the submission to restore and then the user can just save that, so we need the whole submission to be stored. but I think we could think about a merge strategy
  • v

    VadimG

    12/01/2022, 6:21 PM
    Yes, it's a little tricky, if I'll figured out - will share with you ofc
  • k

    Koili

    12/02/2022, 12:03 PM
    hey, does twill 2.x support laravel 9.x? docs seem to indicate no, but some discussions say otheriwse https://twill.io/docs/getting-started/#:~:text=Twill%202.x%20is%20compatible%20with%20Laravel%20versions%205.8%20to%208%2C%20running%20on%20PHP%207.1%20and%20above.
  • i

    ifox

    12/02/2022, 12:04 PM
    hey @Koili it definitely does
  • i

    ifox

    12/02/2022, 12:04 PM
    that piece of text hasn't been updated
  • s

    savchuk.ivan

    12/04/2022, 3:16 PM
    Good evening. Please advise on this matter. I have a repeater with a select field in a block. How can I pass data to the select field?
    k
    • 2
    • 6
  • e

    elkex

    12/05/2022, 9:01 AM
    Is it possible to change the media upload paths? The documentation does not mention much..
  • s

    savchuk.ivan

    12/05/2022, 9:51 AM
    @elkex twill.php file. about this you mean?
  • e

    elkex

    12/05/2022, 9:53 AM
    Yes, but without the UUID folder etc, would like to change that
  • k

    kalle

    12/05/2022, 10:03 AM
    Im afraid that you cant achive that out of the box with Twill. UUID is generated by frontend upload component https://github.com/area17/twill/blob/2.x/src/Http/Controllers/Admin/MediaLibraryController.php#L167 This can only be achived by overriding this controller and applying own logic. If you need this from external upload, that can be achived easily.
  • i

    ifox

    12/05/2022, 11:47 AM
    @elkex can you share why you're looking to remove the uuid from the path? FYI it is to let users upload duplicate filenames without any issues, and is also helping to get a unique url for caching purposes. However, if it bothers your users on the frontend, you can always serve images and files on a vanity url through your own controller, but you'll have to deal with potential filename conflicts.
  • e

    elkex

    12/05/2022, 1:35 PM
    It would have been easier to get it to work with spatie/laravel-medialibrary to create a frontend download system for multiple files at once
  • i

    ifox

    12/05/2022, 1:39 PM
    I'm not sure that's answering my question, but ok. Laravel Media Library didn't exist when Twill was created, and depending on a package that offers a paid version isn't ideal for us. Creating a link in your frontend to download multiple files from twill isn't a problem though, if that's what you're looking for.
  • e

    elkex

    12/05/2022, 1:49 PM
    No, I managed to fix it with Zappier!
  • e

    elkex

    12/05/2022, 1:50 PM
    When creating custom block classes, how can you access the data send via this class?
  • i

    ifox

    12/05/2022, 1:50 PM
    oh really? I'm curious, do you mind sharing more about what you did with zappier?
  • i

    ifox

    12/05/2022, 1:50 PM
    the keys you return from that class should be available as variables within the view
  • e

    elkex

    12/05/2022, 1:50 PM
    I mean Zipstream haha *
1...432433434...484Latest