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

    vianney

    07/07/2021, 10:07 PM
    ohhh okay let me try that
  • p

    pboivin

    07/07/2021, 10:08 PM
    Like
    <input :name="fieldName('vimeo_url')" ... >
  • p

    pboivin

    07/07/2021, 10:11 PM
    Gotta run, hope I could be helpful!
  • v

    vianney

    07/07/2021, 10:18 PM
    i appreciate ur help 🙂
  • v

    vianney

    07/07/2021, 11:52 PM
    seems like even if the input has the correct name values it doesn't work adding it to the request
  • v

    vianney

    07/08/2021, 12:31 AM
    I made it work using an a17-textfield component inside instead of using a custom input element
  • u

    user

    07/08/2021, 11:06 AM
    I have a question, can I set specific translations on specific modules? Like: Blogs: en, de Projects: en, de, nl Library: TestA, TestB
  • i

    ifox

    07/08/2021, 11:08 AM
    hey @User, do you mean preventing editors from translating specific modules in specific languages? If you put all the languages you need in translatable.php, your editors will be able to publish specific languages on each records.
  • u

    user

    07/08/2021, 11:09 AM
    I want that specific CRUD modules has only access to certain translations. So my config would have:
    en,de,nl,testa,testb
    but on blogs you can only translate for
    en
    and
    de
  • u

    user

    07/08/2021, 11:58 AM
    I disable createModal but when clicking "Add new" it still happens..? Can this be a bug?
  • i

    ifox

    07/08/2021, 12:13 PM
    it's not. The primary field (title here) is always in the modal, but when you disable the "create" modal , it is loading the full form behind it, and allows you to fill in everything before saving the whole thing (instead of creating a record with only a title)
  • i

    ifox

    07/08/2021, 12:14 PM
    https://github.com/area17/twill/blob/f252727d6bc213642ef1d06050ecc31ccabe9132/views/layouts/main.blade.php#L82
  • i

    ifox

    07/08/2021, 12:15 PM
    this is how languages are being pulled, you should be able to customize this depending on the module
  • i

    ifox

    07/08/2021, 12:16 PM
    but I'm not sure why you would need that because you can control the publication state of each language in each record
  • u

    user

    07/08/2021, 1:34 PM
    Ow but I didnt had this happen before
  • i

    ifox

    07/08/2021, 1:37 PM
    as in, it used to load the form without opening the modal on load? that's surprising because it's never been implemented as such
  • u

    user

    07/08/2021, 1:37 PM
    Mmm maybe I saw it wrong
  • u

    user

    07/08/2021, 1:37 PM
    But skipping the modal and only using the form is not possible?
  • i

    ifox

    07/08/2021, 1:38 PM
    you're skipping the modal in the index view and going straight to the form already, it's just that it's opened by default for the user to fill in the title before working on the rest of the form
  • u

    user

    07/08/2021, 1:39 PM
    Ow but this is really weird. Can this be disabled at all? This seems like a weird workflow. You wanna skip the modal and use the form and you end up still getting the modal. This only solves the issue with nullable fields but still gives you a weird flow
  • u

    user

    07/08/2021, 1:42 PM
    In my opinion the option only solves the technical problem with nullables but does not forward it to the frontend
  • i

    ifox

    07/08/2021, 1:42 PM
    so how would your user fill in the title field? I'm sure you're going to say well i can have the title field on the form itself, but then the UI element that shows the record title and permalink doesn't make any sense anymore. I get what you're saying though, we could have a mode that doesn't use the modal AT ALL. I don't think the flow is that weird to be honest, it's just asking you to provide a title first and then you move on to all the other fields
  • u

    user

    07/08/2021, 1:43 PM
    Copy code
    @formField('input', [
            'name' => 'title',
            'label' => 'Title',
            'maxlength' => 100
        ])
    If you not want nullables fields and the modal I expect that the developer wants the data before record creation. This means he needs to add the title field to the form. But why is a permalink always added?
  • i

    ifox

    07/08/2021, 1:45 PM
    if you are not using slugs it's not going to be there, you can also disable it, and you can also change the fields in the modal.
  • u

    user

    07/08/2021, 1:47 PM
    Alright fair enough. But I think these little things are avoiding big adoption along with the docs. I would almost switch over now because these simple things and workflows are not really (in a usual way) possible within twill. There is too much overkill for a CMS.
  • u

    user

    07/08/2021, 1:47 PM
    And that for something that is greatly build
  • u

    user

    07/08/2021, 1:50 PM
    Also... When disabling softDeletes in the migration I get a error on the index of the CRUD. Softdelete aren't a default laravel implementation of a model. And why can I not find it how to disable it within the Twill CRUD?
    Copy code
    SQLSTATE[42S22]: Column not found: 1054 Unknown column 'library_items.deleted_at' in 'where clause' (SQL: select count(*) as aggregate from `library_items` where `library_items`.`deleted_at` is null)
  • p

    pboivin

    07/08/2021, 2:11 PM
    I think a simple way to bypass the soft delete would be to set
    $forceDeleting = true
    on your model :
    Copy code
    class Article extends Model implements Sortable
    {
        use HasBlocks, HasSlug, HasMedias, HasFiles, HasRevisions, HasPosition;
    
        protected $forceDeleting = true;
    This is totally from base Laravel by the way : https://laravel.com/api/8.x/Illuminate/Database/Eloquent/SoftDeletes.html
  • u

    user

    07/08/2021, 2:12 PM
    Awesome, ill test. It is indeed a core laravel feature but is not by default enabled
  • p

    pboivin

    07/08/2021, 2:12 PM
    It is, in the context of Twill 🙂
1...555657...484Latest