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

    nuffsaid

    05/27/2022, 2:56 PM
    thank you for the quick fix!
  • h

    Harings Rob

    05/27/2022, 2:59 PM
    Im glad it worked!
  • t

    tenZdenda

    05/27/2022, 4:31 PM
    Hello guys, how does the publish function works? I am expecting that I need to setup a worker who will check and publish the article, right?
  • i

    ifox

    05/27/2022, 5:00 PM
    Hi @tenZdenda what do you mean? check what?
  • i

    ifox

    05/27/2022, 5:01 PM
    oh you mean the publications dates?
  • i

    ifox

    05/27/2022, 5:03 PM
    well that depends how your frontend is build but if it's a standard Laravel Blade rendered app you'd query the published articles by dates. If you cache your responses then yes you might want to schedule a check to invalidate it.
  • d

    dedli

    05/28/2022, 3:25 PM
    @ifox I am sorry for the disturbance, in config when it is block i miss 'renderForBlocks' => true. Now everything is working. Thanks a lot for help!
  • d

    dedli

    05/28/2022, 4:13 PM
    Could somebody help with browser. When I try to use browser in block with data from multiple modules I have an error. My field config is:
    Copy code
    @formField('browser', [
           'modules' => ['personalCategories', 'pages'],
           'name' => 'page_id',
           'label' => 'Посилання на сторінки',
           'max' => 1
       ])
    routes to personalCategories and pages are root. Should I add 'routePrefix' to config and should I add 'browser_route_prefixes'? If I should, what prefixes should I add?
  • i

    ifox

    05/28/2022, 4:21 PM
    Is the module in which you're using this block at the root too? In any case, safer to set them up. In that case they should be set to
    null
    , because by default it would use the current route prefix.
  • a

    amargoCactus

    05/28/2022, 4:34 PM
    hello, how can i get the slug for a page by the page id?
  • i

    ifox

    05/28/2022, 4:35 PM
    $page->slug
  • d

    dedli

    05/28/2022, 4:36 PM
    Yes, module in witch I use blocks is in root too. I add null in both cases but have the same error
  • i

    ifox

    05/28/2022, 4:39 PM
    the plural modules parameter takes an array of arrays, not just strings
  • d

    dedli

    05/28/2022, 4:42 PM
    In my case when I debug it $module is just a plain string
  • i

    ifox

    05/28/2022, 4:47 PM
    because that's what you sent to it here
  • a

    amargoCactus

    05/28/2022, 4:59 PM
    thanks
  • a

    amargoCactus

    05/28/2022, 6:35 PM
    why with small images does it look very pixelated in the thumbnails? How can i fix this?
  • a

    amargoCactus

    05/28/2022, 6:37 PM
    $mediaParam
    is
    Copy code
    'icon' => [
      'default' => [
        [
          'name' => 'default',
          'ratio' => 0,
        ],
      ],
    ],
  • d

    dedli

    05/29/2022, 7:14 AM
    I understand, but i don't understand what I am doing wrong ) I put to browser config array of modules names, I set routePrefix and browser_route_prefixes each module to null. If I set any of these modules to browser config moduleName everything is working
  • h

    Harings Rob

    05/29/2022, 7:37 AM
    Hey, first thing I see is that the original image is 55x55 so it seems that what you uploaded is already very small.
  • h

    Harings Rob

    05/29/2022, 7:38 AM
    You need to use
    'modules' => ['name' => 'personalCategories', 'routePrefix' => 'pages'],
    I think
  • d

    dedli

    05/29/2022, 11:44 AM
    Yes, thats it. Thanks! 'modules' needs key value pairs
  • d

    dedli

    05/29/2022, 2:08 PM
    Hi again ) Is it option to clone block with content or it is possible cloning only stucture of block without content?
  • a

    amargoCactus

    05/29/2022, 2:12 PM
    yes but when the original crop appears at the beginning the image looks good, but when the other crops are loaded (in this case i only have set a default crop and i take the whole ratio) in case of small images the image is pixelated a lot as if they had made a terrible zoom, very weird 😅
  • d

    dedli

    05/29/2022, 3:53 PM
    @amargoCactus you fix your problem with transparency of image? How and where you path param 'fm' => 'png'?
  • a

    amargoCactus

    05/29/2022, 4:04 PM
    add this in your config/twill.php
    Copy code
    'glide' => [
      'default_params' => [
        'fm' => 'png',
        'q' => '80',
        'fit' => 'max',
       ],
    ],
  • d

    dedli

    05/29/2022, 4:15 PM
    Thanks!
  • a

    amargoCactus

    05/29/2022, 4:17 PM
    Is there a way to make the preview of a block load in the editor without making changes to the form? i have a block without fields that only fetch records from a module 😅
  • a

    amargoCactus

    05/29/2022, 5:23 PM
    found a hacky way to do this, i added an active checkbox inside a div with display none
  • h

    Harings Rob

    05/30/2022, 6:33 AM
    Hey @amargoCactus that seems like a good solution for now. I will add this as an issue as well so we can tackle it in 3.x
1...332333334...484Latest