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

    jefsev

    03/17/2023, 1:22 PM
    Hi for twill package development inside TwillPackageServiceProvider there is a boot function. If in my own serviceprovider is also have a boot function to boot some other things that are not in the capsule then the boot inside TwillPackageServiceProvider is not used. How do i fix this?
  • j

    jefsev

    03/17/2023, 1:25 PM
    parent::boot();\
  • j

    jefsev

    03/17/2023, 1:25 PM
    i think
  • r

    REZOR

    03/17/2023, 4:46 PM
    Hello guys. I've tried Twill v3 for the first time and have several issues: 1. Labels defined in configs are not translatable 2. Can not use kebab case for module urls 3. I Can't properly structure my code. (Put models and repositories in separate folders)
  • i

    ifox

    03/17/2023, 5:46 PM
    Hi @REZOR 1. which labels do you mean exactly? 2. that could certainly be changed if there is consensus that kekab case looks better, but I don't really see why the casing would be configurable 3. You can, using Capsules
  • r

    REZOR

    03/17/2023, 6:10 PM
    @ifox 1. For example title here. I can not use trans() inside config ``` 'settings' => [ 'title' => 'Settings', 'route' => 'twill.settings', 'params' => ['section' => 'contact'], 'primary_navigation' => [ 'general' => [ 'title' => 'Contact', 'route' => 'admin.settings', 'params' => ['section' => 'contact'] ], 'seo' => [ 'title' => 'SEO', 'route' => 'admin.settings', 'params' => ['section' => 'seo'] ], ] ],
  • i

    ifox

    03/17/2023, 6:11 PM
    On twill 3 you should use the OOP navigation builder, which will let you use trans
  • r

    REZOR

    03/17/2023, 6:11 PM
    I saw, the concept of menu builder and it is amazing
  • r

    REZOR

    03/17/2023, 6:16 PM
    Can I create subdirectories using capsules? For example: Models\Blog\Post, Models\Blog\Category
  • e

    Erwin

    03/17/2023, 6:31 PM
    Hey i was wondering if theres there a way i can use images instead of svgs for the block editor "@twillBlockIcon" without overwriting the blocks.vue component?
  • r

    REZOR

    03/17/2023, 6:37 PM
    @Erwin dirty hack like:
    Copy code
    <svg>
      <image xlink:href="https://example.com/image.jpg" x="0" y="0" width="100" height="100" />
    </svg>
  • r

    REZOR

    03/17/2023, 6:50 PM
    @ifox Here how I made urls kebab case: https://github.com/therezor/twill/commit/e36b5d70663081f8e8a20bcea33226860f94fda4
  • e

    Erwin

    03/18/2023, 1:37 PM
    When i add this little snippet to use custom block icons to my block_editor in twill.php
    Copy code
    "directories" => [
                "source" => [
                    "icons" => [
                        base_path("vendor/area17/twill/frontend/icons"),
                        resource_path("views/twill/icons"),
                    ],
                ],
            ],
    It gives me this error (see screenshot), i'm using twill version 3.0.0-rc4. Is this a bug or am i doing something wrong?
  • Twill vs Drupal
    m

    millpreet

    03/20/2023, 5:25 AM
    quick question, thinking of using Twill for eCommerce store, need custom integrations with some level of security so pros of shopify quickly dwindle as would need to make microservices for them. Shortened list of enticing options to migrate site off squarespace to Twill and Drupal, is anyone familiar enough with both to tell me what might be a better option? I have JS PHP and Laravel experience, have used dynamic frontend frameworks like angular and vue.js in the past. Any advice would be appreciated
    i
    a
    • 3
    • 6
  • d

    david HUN

    03/20/2023, 11:26 AM
    Hi Guys. I started a new project, and I think I start it with the new 3.0.0-rc4. I want to use https://github.com/area17/twill-capsule-homepages package too. But after I fixed the capsule route ('admin.homepages.landing', to 'twill.homepages.landing',) I have an other error: "Undefined variable $formBuilder" I tried to find some idea in upgrade guide but nothing found. Do you have any suggestion, how can I fix this, and how can I use this capsule with 3.0? Thank you!
  • a

    antonioribeiro

    03/20/2023, 12:13 PM
    Hey @david HUN , these capsules will probably have to be reviewed for Twill 3, things changed a bit and I'm not sure if they are compatible. We already did on some others but not this one I believe
  • b

    BlazinglyFast

    03/20/2023, 2:24 PM
    Hey I have this form field set maxlength to 115, but I only get the warning that I passed the minimum length. Is there a way to block the typing at 115?
    Copy code
    @formField('input', [
        'name' => 'short_description',
        'label' => __('form.short_description'),
        'translated' => true,
        'maxlength' => 115,
        'placeholder' => __('form.admin.course.short_description.placeholder'),
        'type' => 'textarea',
        'rows' => 3
    ])
  • k

    kalle

    03/20/2023, 3:14 PM
    It should be
    min
    and
    max
    for the input components (Twill 3). I think 2.x doesnt support that.
  • i

    ifox

    03/20/2023, 3:15 PM
    the input field on Twill 2 does block more chars, but not if it's a textarea
  • b

    BlazinglyFast

    03/20/2023, 3:17 PM
    indeed
  • Medias field error and image rendering
    n

    Nechalon

    03/21/2023, 12:56 PM
    Hi, I have a simple form where I have a title and a
    medias
    field which holds an image, and everytime I try to save the new picture, it fails with this error
    Your submission could not be validated, please fix and retry
    . I tried setting up the $mediasParams array correctly, but it seems like it has no effect. I believe that the model is setup correctly because it saves the title when the image field is not there to throw an error. What else do I need to setup to save the selectd image?
    i
    k
    • 3
    • 28
  • Homepage capsule
    d

    david HUN

    03/21/2023, 3:25 PM
    Ok, thank you. I'll use singleton module instead of that capsule.
    i
    • 2
    • 1
  • Gitpod
    m

    millpreet

    03/22/2023, 2:06 AM
    any of you peeps use gitpod as a dev environment by any chance?
    i
    • 2
    • 3
  • Learning dev environment from scratch and benefits of lando long term
    m

    millpreet

    03/22/2023, 7:21 AM
    Other question(hopefully least one) Lando any useful for day to day dev from that you peeps have seen? I presume long term such automation would be nice as team grows, but initially as a one person team, should just start with a manually configured environment, then learn to containerize it manually just so I know the process in case it needs to be done like that/for familiarity
    i
    • 2
    • 6
  • Laravel 10 support
    a

    amargoCactus

    03/22/2023, 2:21 PM
    twill 3.x works with laravel 10?
    i
    • 2
    • 1
  • Rendering images issue
    n

    Nechalon

    03/22/2023, 4:00 PM
    How could I get the correct URL of the medias image? I want to display an image which was saved with medias. I'm trying
    {{ $item->image('image_key') }}
    but it doesnt seem to work, it gets a URL but it doesnt display the image.
    i
    • 2
    • 3
  • Conditional select/browser fields
    c

    Corneel

    03/22/2023, 11:07 PM
    Hi, is it possible to dynamically change the options of a select field based on the value of another select or a browser? I think I can get the functionality I want using "Connecting 2 browser fields", but for ease of use I prefer an unpacked select as I know I will only have a few options.
    i
    • 2
    • 4
  • Showing activity info on form
    c

    Constant Variable

    03/23/2023, 9:01 AM
    Activity infos inside the edit form Hellooo I need to display in each form who edited and who created the article and when ? A bit like on the dashboard; > "Created 10 days ago by Admin & updated about 16 hours ago by Admin " Any idea how to add this kind of custom information into the form, into the side panel for example? Thank you, have a nice day
    i
    • 2
    • 2
  • Art directed responsive image rendering
    n

    Nechalon

    03/23/2023, 11:10 AM
    Hello, How are twill image crops applied? I have different crops defined for desktop, tablet and mobile. But I only see desktop displayed in all cases. I display the images with 'desktop' crop key (
    $item->image('picture', 'desktop')
    ), is this why is only displays that crop mode? I tried it with
    tablet
    and
    mobile
    but it still only displays the
    desktop
    version.
    i
    • 2
    • 10
  • i18n for Twill navigation
    d

    david HUN

    03/23/2023, 4:27 PM
    Hi. Can I translate the module name in the top menu? I tried trans() function in twill-navigation.php but it not worked. Twill v3
    i
    • 2
    • 2
1...480481482483484Latest