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

    ifox

    08/03/2022, 7:45 PM
    @onepiece sorry for the delay. That would be happening when you are trying to use a browser field pointing to your pages modules while it is not sitting at the root of your navigation/routing.
    routePrefix
    parameter of the browser field is what you'd need to fix it.
  • o

    onepiece

    08/03/2022, 7:47 PM
    @ifox this error occurs when using the browser in form.blade. any solution??
  • o

    onepiece

    08/03/2022, 7:47 PM
    @formField('browser', [ 'modules' => [ [ 'label' => 'Projects', 'name' => 'projects', ], ], 'name' => 'projects', 'label' => 'Link interno', 'max' => 1, 'min' => 1 ])
  • o

    onepiece

    08/03/2022, 7:48 PM
    in my repository i add: protected $relatedBrowsers = ['projects'];
  • o

    onepiece

    08/03/2022, 7:48 PM
    in my model i use use A17\Twill\Models\Behaviors\HasRelated;
  • i

    ifox

    08/03/2022, 7:48 PM
    is your projects module at the top of your admin routes or inside a group?
  • o

    onepiece

    08/03/2022, 7:49 PM
    Route::group(['prefix'=>'industry'],function(){ Route::module('industries'); Route::module('projects'); });
  • i

    ifox

    08/03/2022, 7:50 PM
    then, like I said you need to use routePrefix when defining that module in the browser field.
    'routePrefix' => 'industry'
  • n

    Nano

    08/03/2022, 10:38 PM
    Hi to all! I'm having a weird situation with a conditional field. i'll upload a video. The problem seems to be when trying to change between the options, i cannot explain with words, but i have to click the radio button twice so the conditional field appears.
  • n

    Nano

    08/03/2022, 10:38 PM
    Copy code
    @extends('twill::layouts.form')
    
    @section('contentFields')
        @formField('radios', [
            'name' => 'type',
            'label' => 'Type',
            'default' => 'image',
            'inline' => true,
            'options' => [
                [
                    'value' => 'image',
                    'label' => 'image'
                ],
                [
                    'value' => 'facebook',
                    'label' => 'facebook'
                ],
                [
                    'value' => 'video',
                    'label' => 'video'
                ],
                [
                    'value' => 'youtube',
                    'label' => 'youtube'
                ],
                [
                    'value' => 'brightcove',
                    'label' => 'brightcove'
                ],
                [
                    'value' => 'native-brightcove',
                    'label' => 'native-brightcove'
                ],
                [
                    'value' => 'file',
                    'label' => 'file'
                ],
            ],
            
        ])
    
        @formConnectedFields([
            'fieldName' => 'type',
            'fieldValues' => 'image',
            'keepAlive' => false,
        ])
            @formField('medias', [
                'name' => 'gallery_item_image',
                'label' => 'Image',
            ])
        @endformConnectedFields
    
        @formConnectedFields([
            'fieldName' => 'type',
            'fieldValues' => ['facebook', 'youtube', 'brightcove', 'native-brightcove'],
            'keepAlive' => false,
        ])
            @formField('input', [
                'name' => 'url',
                'label' => 'URL',
            ])
        @endformConnectedFields
    @stop
  • i

    ifox

    08/03/2022, 10:41 PM
    Hi @Nano thanks for reporting this. Twill 2.8?
  • n

    Nano

    08/03/2022, 10:41 PM
    yeap
  • n

    Nano

    08/03/2022, 10:42 PM
    i searched all over the server and google it but it seems that this error is only happen to me
  • i

    ifox

    08/03/2022, 10:50 PM
    I remember something similar. It should not be too hard to fix if we're able to reproduce. Does using keepAlive true change anything?
  • n

    Nano

    08/03/2022, 11:05 PM
    i'll try
  • n

    Nano

    08/03/2022, 11:06 PM
    same :/
  • n

    Nano

    08/03/2022, 11:07 PM
    and i use radio buttons, because if i use a select it freezes the tab in chrome
  • d

    dakaalim

    08/04/2022, 8:03 AM
    Block gallery does not exists or the mandatory property 'title' was not found on this block. If you are still using blocks on the twill.php file, please check if the block is present and properly configured.
  • i

    ifox

    08/04/2022, 8:29 AM
    @dakaalim hello, and some context, maybe? I'm not sure I can help you more considering the error message is explicit and you didn't share what you didn't understand or didn't do from what it says.
  • i

    ifox

    08/04/2022, 8:30 AM
    are you using blocks with blade directives for configuration or the twill.php config file? Is this the example gallery block within twill or your own?
  • u

    24kappa

    08/04/2022, 10:41 AM
    Hi, does anybody has some suggestions on how to translate
    $permalinkBase
    ?
  • u

    24kappa

    08/04/2022, 10:43 AM
    I found this https://twill.io/docs/crud-modules/controllers.html#localizing-the-permalink I'll take a look
  • s

    Sami

    08/04/2022, 12:01 PM
    Hello, I want to require package
    cwsdigital/twill-metadata
    to our project. The problem is this package requires twill
    ^2.2
    however we are already experimenting with
    3.0.0-alpha1
    and thus there is a conflict. How do I tell composer to ignore the
    ^2.2
    requirement?
  • i

    ifox

    08/04/2022, 12:07 PM
    Hi @Sami you can't really do that with composer, I'd suggest forking the repo and upping its Twill dependency to Twill 3 so you can try it in your own project.
  • s

    Sami

    08/04/2022, 12:08 PM
    will do, thanks
  • a

    antonioribeiro

    08/04/2022, 2:08 PM
    Hey @Sami have you tried to alias the version with Composer? composer require “area17/twill:3.0.0-alpha1 as ^2.2” https://getcomposer.org/doc/articles/aliases.md
  • u

    24kappa

    08/04/2022, 3:22 PM
    Hi, im facing a problem with a multilanguage site, when i render the page only blocks are showed with the correct translation, attributes of the models are not being translated. On the database the translation are saved and are active. How to retrieve translated atttributes on blade?
  • u

    24kappa

    08/04/2022, 4:00 PM
    I found this
    $item->translatedAttribute('title')[LaravelLocalization::getCurrentLocale()]
    , there's a shorter way?
  • a

    antonioribeiro

    08/04/2022, 4:15 PM
    @24kappa $item->title
  • i

    ifox

    08/04/2022, 9:10 PM
    @24kappa are you using a package for the frontend multilingual routes?
1...369370371...484Latest