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

    user

    06/03/2021, 8:25 AM
    looking forward to having something that has a page builder
  • u

    user

    06/03/2021, 8:26 AM
    to build front-ends just like wordpress
  • u

    user

    06/03/2021, 8:26 AM
    but in laravel
  • i

    ifox

    06/03/2021, 8:29 AM
    right, for sure. Well yeah Twill is a CMS builder for Laravel. I'll reiterate my question though, how do you use wordpress? Posts with body as WYSIWYG, ACF, Divi page builder, REST API, themes? Twill/Laravel won't build your frontend, if you are using Worpress as a no-code page builder.
  • u

    user

    06/03/2021, 8:36 AM
    so how can we have a front-end page builder to build and edit the front-end
  • i

    ifox

    06/03/2021, 9:44 AM
    it really depends what you mean by page builder. Are you using wordpress with a theme and coding your frontend in there? Or are you doing everything in the CMS?
  • u

    user

    06/03/2021, 9:50 AM
    everything from scratch using reactjs on the front-end
  • u

    user

    06/03/2021, 9:50 AM
    i built up an online store for my client
  • u

    user

    06/03/2021, 9:51 AM
    they are planning on having about 7 guys handling content on the front-end support forum and also blogs
  • u

    user

    06/03/2021, 9:51 AM
    left now with coming up with a CMS to help them manage content on the front-end
  • i

    ifox

    06/03/2021, 9:59 AM
    Ok cool well Twill has a concept of a block editor. You can create as many content types and bespoke blocks your frontend would need. Say you have a react component for a slideshow, you'd create a Twill block with the fields you need (maybe the slideshow has a title or whatever else), and then either feed those react components directly in Blade files or by exposing content on a frontend route for your react app to request it.
  • c

    chrispymm

    06/03/2021, 10:44 AM
    Has the block editor crops config moved? I couldn't get my block medias to save, and my block media crops were simply in config/twill.php under the crops key. However I'd just setup a files field within a block and that uses a block_editor['files'] key. So just out of experimentation, I moved the crops under the block_editor key and it worked
  • i

    ifox

    06/03/2021, 10:45 AM
    no, it hasn't moved, always has been at
    twill.block_editor.crops
  • c

    chrispymm

    06/03/2021, 10:49 AM
    strange, thats not what the docs say and in my older twill projects I had them under the top level
    twill.crops
    key and working, also in the default twill config file in the repo they are under the top level crops key
  • c

    chrispymm

    06/03/2021, 10:49 AM
    https://github.com/area17/twill/blob/2.3.0/config/blocks.php
  • c

    chrispymm

    06/03/2021, 10:51 AM
    but I have just noticed that the screenshot in the files section of the docs shows the
    crops
    key under the
    block_editor
    key
  • c

    chrispymm

    06/03/2021, 10:57 AM
    Happy to have got it working, but I reckon that paragraph I screenshotted in the docs could do with amending to be more specific. It also seems strange that the default configuration has the top level
    crops
    key still...
  • i

    ifox

    06/03/2021, 12:00 PM
    the default configuration you are linking to is for
    twill.block_editor
    not
    twill
    , but I hear you that paragraph is confusing
  • i

    ifox

    06/03/2021, 12:01 PM
    now the code driving this hasn't changed in 3 years: https://github.com/area17/twill/blob/2.x/src/Repositories/Behaviors/HandleMedias.php#L78
  • i

    ifox

    06/03/2021, 12:03 PM
    it has always been reading from
    twill.block_editor.crops
    . what might have happened to you is that you had the same keys defined in the model's
    mediasParams
    you were editing blocks on, which is a larger concern we're looking to fix (avoiding conflicts between those automatically instead of relying on developers to use unique keys)
  • c

    chrispymm

    06/03/2021, 12:47 PM
    Thanks for the replies. I actually just went back and checked my previous projects, and realised that I was using
    twill.block_editor.crops
    and my error was assuming my current config was copied from one of those projects 🤦‍♂️Sorry for wasting your time!
  • i

    ifox

    06/03/2021, 12:48 PM
    it's ok! at least we know we need to clarify this in the docs, it is very confusing indeed
  • b

    bwaltz6

    06/03/2021, 5:49 PM
    what's the best way to include videos in the media library? I see that I need to add .mp4 to the twill.media_library.allowedExtensions array, but when I do a successful upload I have a broken image...which is fine. But it would also be hard to identify anything if I had lots of videos uploaded
  • i

    ifox

    06/03/2021, 5:56 PM
    we use the files tab for mp4 files, unless the image service supports video transcoding. Most of our clients rely on YouTube or Vimeo, but for decorative videos we upload files too, just not in the images tab.
  • b

    bwaltz6

    06/03/2021, 5:58 PM
    ok perfect, thanks!
  • u

    user

    06/03/2021, 10:09 PM
    Hi all, I am trying to use the repeater field but the add button is missing, I spent a couple of hours with debugging and investigating but nothing is changed. Can any body help me about what I am doing wrong? My main form.blade.php:
    Copy code
    <a17-fieldset title="Seances" id="seances" :open="true">
            @formField('repeater', [
                'type' => 'seance'
            ])
        </a17-fieldset>
    config.twill.php:
    Copy code
    <?php
    
    return [
        'repeaters' => [
            'seance' => [
                'title' => 'Seance',
                'trigger' => 'Add Seance',
                'component' => 'a17-block-seance'
            ]
        ]
    ];
    views/admin/repeaters/seance.blade.php:
    Copy code
    @formField('date_picker', [
        'name' => 'published_at',
        'label' => 'Time'
    ])
    
    @twillRepeaterTitle('Seance')
  • u

    user

    06/03/2021, 10:09 PM
    And this is my output of the "php artisan twill:list:blocks" command. It seems the "seance" repeater is valid.
  • u

    user

    06/03/2021, 10:10 PM
    And this is the output of the form.
  • p

    pablobarrios

    06/03/2021, 10:17 PM
    @User you are missing the
    @twillRepeaterTrigger('Add Something')
    in the
    seance
    file.
  • u

    user

    06/03/2021, 10:19 PM
    Wow
1...192021...484Latest