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

    ifox

    08/26/2022, 4:03 PM
    https://github.com/area17/twill/blob/fe27343211a7033e90a8d803a16c28ec3224bbec/src/TwillBlocks.php#L36
  • i

    ifox

    08/26/2022, 4:03 PM
    https://github.com/area17/twill/blob/fe27343211a7033e90a8d803a16c28ec3224bbec/src/Services/Blocks/Block.php#L548
  • i

    ifox

    08/26/2022, 4:04 PM
    this is where the view for a block is being determined
  • i

    ifox

    08/26/2022, 4:04 PM
    you need to try more before asking for another approach, because these configuration options are exactly what you're looking for
  • i

    ifox

    08/26/2022, 4:12 PM
    https://github.com/area17/twill/blob/f289cb331d04172be17a630e331616cbf6297c9e/src/TwillPackageServiceProvider.php#L85
  • i

    ifox

    08/26/2022, 4:12 PM
    some more documentation in the comments here
  • s

    Sami

    08/27/2022, 1:37 PM
    Hello, is block editor in repeater supported?
  • h

    Harings Rob

    08/27/2022, 3:26 PM
    Hey @Sami, it is not. In 3.x you can nest block editors in others. Not sure about repeaters.
  • u

    24kappa

    08/30/2022, 8:04 AM
    Hello, I'm facing a strange behaviour on my website with the images. I'm using
    Copy code
    MEDIA_LIBRARY_IMAGE_SERVICE=A17\Twill\Services\MediaLibrary\Glide
    MEDIA_LIBRARY_ENDPOINT_TYPE=local
    Everything seems to work fine but when i open the console browser I've noticed that images have a
    404
    in their header response even they are showed fine in the page. Does anybody had this strange behaviour ?
    u
    • 2
    • 56
  • u

    23r01nf1n17y

    08/30/2022, 10:44 AM
    Hello I m facing a strange behaviour on
  • b

    BA7YA

    08/30/2022, 12:00 PM
    Hi. I have a problem when Im trying to update user's role in CMS Users , im gettin this error. Could you help me please?
    u
    • 2
    • 16
  • u

    23r01nf1n17y

    08/30/2022, 12:18 PM
    Hi I have a problem when Im trying to
  • s

    sammyOG

    08/30/2022, 5:41 PM
    Hi, I'm following the custom CMS pages documentation (https://twill.io/docs/custom-cms-pages/), but after following all the steps and including the @extends('twill::layouts.free'), I get this error message when I go to the backend of my site. What should I do?
  • i

    ifox

    08/30/2022, 5:42 PM
    Hi @sammyOG did you disable the dashboard feature?
  • s

    sammyOG

    08/30/2022, 7:41 PM
    No I have my dashboard enabled, when I remove the route to my custom page the dashboard works fine. My twill.php is empty so I haven't configured anything there.
  • k

    kalle

    08/30/2022, 7:57 PM
    Can you show us your twill navigation config and admin routes?
  • k

    kalle

    08/30/2022, 9:06 PM
    I have just tested it localy and it seems thay you cant have route
    /
    . You'll need to rename it to something else. Ill need to dig deeper to find out what is the problem.
  • s

    sammyOG

    08/30/2022, 9:15 PM
    Thank you, I now changed it to /homepage. I wanted to use the '/' route so the first page of the dashboard was the homepage tab. It works for now, but I don't know it this is the best way of creating a dynamic homepage
  • k

    kalle

    08/30/2022, 9:16 PM
    If you need redirect after login auth you can set
    twill.auth_login_redirect_path
    to your custom endpoint.
  • k

    kalle

    08/30/2022, 9:17 PM
    And disabling dashboard should provide you with first label
    Homepage
    as a dashboard alternative. Or you can overwrite
    twill/views/partials/navigation/_title.blade.php
    with your local view and change route dashboard to your custom which will act same as the default Dashboard.
  • s

    Sami

    08/31/2022, 7:29 AM
    Hello, with Twill 3.x and new method to setup indexColumns (using
    getIndexTableColumns()
    function), how to set a column to contain link to form? My code:
    Copy code
    php
    protected function getIndexTableColumns(): TableColumns
    {
        return new TableColumns([
            PublishStatus::make(),
            Text::make()
                ->field('title')
                ->title('Title')
        ]);
    }
    Results in
  • h

    Harings Rob

    08/31/2022, 7:30 AM
    @Sami check the parent implementation it goes something like this:
    Copy code
    php
                $columns->add(
                    Text::make()
                        ->field($this->titleColumnKey)
                        ->sortable()
                        ->linkCell(function (TwillModelContract $model) {
                            if ($this->getIndexOption('edit', $model)) {
                                return $this->getModuleRoute($model->id, 'edit');
                            }
                        })
                );
  • h

    Harings Rob

    08/31/2022, 7:31 AM
    so you can use "linkCell" closure to build the link. The above will make the link to the edit page.
  • s

    Sami

    08/31/2022, 7:34 AM
    Yea, thanks, this works! What confuses me is that in different module I have several index columns like this and
    $titleColumnKey
    is set to 'name'. For some reason the 'name' column automatically has the edit link 🤷🏻‍♂️
  • h

    Harings Rob

    08/31/2022, 7:35 AM
    hmm 🤔
  • g

    Gvido Blue Fox

    08/31/2022, 8:22 AM
    Hello. I created parent-child modules according to the instructions from the documentation. When I create the first parent element, I get these errors.
    u
    i
    k
    • 4
    • 53
  • g

    Gvido Blue Fox

    08/31/2022, 8:22 AM
    after creating
  • i

    ifox

    08/31/2022, 10:56 AM
    the js is using name as the linkable column, so it looks for the edit url in the data and does it on its own cc @Harings Rob
  • s

    Sami

    08/31/2022, 2:20 PM
    good to know 😊 but not sure if this information gave me any clue to gain control over the automatic linkage 😁
  • h

    Harings Rob

    08/31/2022, 2:29 PM
    @Sami you do not want to link the name column?
1...380381382...484Latest