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

    void

    08/18/2021, 5:19 PM
    I want to integrate vue fullcalendar into one of my modules
  • v

    void

    08/18/2021, 5:20 PM
    clearly I miss something from this https://spectrum.chat/twill/tips-and-tricks/adding-a-custom-block-to-twill-admin-view-with-vuejs~028d79b1-b3cd-4fb7-a89c-ce64af7be4af
    i
    p
    • 3
    • 65
  • s

    sapta34

    08/19/2021, 9:27 AM
    is there any example for frontend navigation? i want full source code including frontend integration.
  • p

    pboivin

    08/19/2021, 12:21 PM
    @User The closest thing I can think of is: https://github.com/cwsdigital/cws-twill-base It features a pretty extensive menu builder in the CMS, a seeder for 2 menu locations (main menu & footer) and some view composers to bring everything to the frontend. I don't think it includes the actual HTML for the menu but this will be pretty specific to your site anyway.
  • s

    sapta34

    08/19/2021, 12:50 PM
    Thanks .. i think this will help me ..
  • u

    user

    08/20/2021, 2:54 PM
    Hello, my name is Alberto I Would like to know if there is a way to mask the input Like this:
    Copy code
    @formfield('input', [
    'name' => 'telefone',
    'label' => 'Telefone',
    'placeholder' => '+55 41 00000-0000',
    'translated' => true,
    'maxlength' => 100,
    'required' => true,
    'mask' => ['+## ## ####-####','+## ## #####-####']
    ])
  • p

    pboivin

    08/20/2021, 3:01 PM
    Hi @User , this is not currently possible out of the box but it's a great idea! This can be accomplished with a custom Vue component, if you want to explore in this direction. Otherwise, I think your best bet for now is the
    placeholder
    or
    note
    attributes.
  • u

    user

    08/20/2021, 3:03 PM
    Hi @User , Thanks for the quick response. I will use the extend method then
  • j

    jamel

    08/20/2021, 7:53 PM
    Hello everyone, i have a question, i made multiple crops for my posts cover images but i don’t really know how to retrieve ger the right one for each situation, for example how do i get the mobile one when the width is under 576px ?
  • p

    pboivin

    08/20/2021, 8:01 PM
    Hey @User , suppose you have a
    Page
    model with a
    header
    image role, which has 2 crops
    mobile
    and
    desktop
    . You can access the crops like this:
    Copy code
    $mobile_image = $page->image('header', 'mobile');
    $desktop_image = $page->image('header', 'desktop');
    You'll need some CSS and/or responsive image markup to bring all this to your frontend.
  • p

    pboivin

    08/20/2021, 8:02 PM
    There's a Twill package that can help you with that: https://github.com/area17/twill-image
  • j

    jamel

    08/20/2021, 8:50 PM
    Okayy, i think i understand now, thank you for the quick answer !
  • k

    Kirk Bushell

    08/21/2021, 3:29 AM
    Hmmm, seeing a throwable error suddenly
  • k

    Kirk Bushell

    08/21/2021, 3:30 AM
    Class "Symfony\Component\Debug\Exception\FatalThrowableError" not found (View: /Users/kirkbushell/Work/Mine/rathetimes/vendor/area17/twill/views/partials/form/utils/_blocks_templates.blade.php)
  • k

    Kirk Bushell

    08/21/2021, 3:30 AM
    Anyone know what's happened?
  • k

    Kirk Bushell

    08/21/2021, 3:32 AM
    Nevermind, got it. hahaha
  • a

    andrewsamuelhan

    08/21/2021, 5:32 AM
    Hi @User is there any way to change the media file uploader vendor? or tweak them?
  • a

    andrewsamuelhan

    08/21/2021, 5:32 AM
    Using uppy.js seems nice, as they can connect with facebook, instagram, dropbox, googledrive, and direct photo from your device
  • a

    andrewsamuelhan

    08/21/2021, 5:35 AM
    I've compared dropzone vs uppy.js plugins and seems the winner right now is uppy.js. Uppy.js is significantly growing
  • i

    ifox

    08/21/2021, 9:55 AM
    Hi @andrewsamuelhan uppy seems great! There was a discussion in #811986440569356308 if you scroll up a bit about finding a replacement for FineUploader. Uppy seems to check a lot of boxes.
  • a

    andrewsamuelhan

    08/23/2021, 6:00 AM
    @User I've read the docs. I think the owner is not supporting the package anymore. Maybe consider to use uppy.js then using deprecated package. It can waste time and efforts.
  • a

    andrewsamuelhan

    08/23/2021, 6:01 AM
    It would be nice if twill can create a package using uppy.js for dropzone replacement.
  • n

    Noemie

    08/23/2021, 7:32 PM
    Hello, I need to go add a button in the menu of my website that will lead to another website. The site is distilleriesduquebec.com I can add it by connecting to the FTP but I would like to know in which html or php file I can find the menu. Also I would like to know where to find the .css file Thank you
  • p

    pboivin

    08/23/2021, 7:44 PM
    Hi @User , from the developer perspective, Twill doesn't really have a standard way or location in the code to build a menu, so this will be completely unique to how your website was made. A good place to look would be under
    resources/views/
    , in one of the
    .blade.php
    files. Here you should find parts of the HTML that make up your menu. If you are looking to simply add a fixed menu item, this might be all you need. 🤞
  • k

    KyleAF

    08/24/2021, 2:01 AM
    Hey @User, I was able to get that to work in my system by doing this: in twill-navigation.php:
    Copy code
    php
    
    return [
    
        //.... other menu items here
    
        'exit-admin-portal' => [
            'title' => new \Illuminate\Support\HtmlString('<span class="envlabel" style="color: white; display: flex; padding: 10px">Exit</span>'),
            'route' => 'exit-admin-portal'
        ]
    ];
    Then just make sure that the "route" variable points to a named route in your routes: Probably web.php:
    Copy code
    php
    Route::get('/exit-portal', 'Path\To\Controller\MISCController@exitPortal')->name('exit-admin-portal');
    From the controller you can do anything you want! For me it was redirect to another page to exit the twill dashboard.
  • j

    jamel

    08/24/2021, 6:34 PM
    Hello, i was wondering about a front end thing, in the pentagram website there is this feature that when you click on a image in a work you will get it bigger in some kind of a modal and you are able to switch to the next photo or the previous one even if they are from different blocks, so i assume there might be a function to get all medias related to a module even if it’s through it’s blocks ?
  • p

    pboivin

    08/24/2021, 7:56 PM
    Hey @User , I don't think there's a built-in way to do this but here's one possible approach:
    Copy code
    $medias = collect([$project])
        ->merge($project->blocks)
        ->flatMap
        ->medias;
    This will give you a collection of all medias attached to
    $project
    and any of its direct children blocks.
  • j

    jamel

    08/24/2021, 8:26 PM
    ohh okay, this seems to work, i think i just need to find a way to maybe remove duplicate
  • j

    jamel

    08/24/2021, 8:26 PM
    thank you !
  • p

    pboivin

    08/24/2021, 8:38 PM
    Cool! I think you could remove duplicates by adding
    ->unique('id');
1...798081...484Latest