ifox
04/01/2022, 3:08 PMifox
04/01/2022, 3:09 PMpazunino
04/01/2022, 3:18 PM23r01nf1n17y
04/03/2022, 7:40 PMFAQ and replaced it's title filed with question. I also added to FAQ Controller : protected $titleColumnKey = 'question'; and protected $indexColumns = [ 'question' => [ 'title' => 'Frage', 'field' => 'question', ], ];
The Module page works just fine and as expected. All CRUD views and all filters (published, draft, ...) are working, BUT:
In my Singelton, with blocks, there is a FAQ block. This uses the browser field type to reference the questions and answers from the FAQ Module. Selecting FAQs and showing only published ones works too (https://github.com/area17/twill/issues/108).
❓ Just after a page reload the "titles" aka. question is no longer visible. Can anyone hint me what I'm doing wrong here?ifox
04/03/2022, 8:17 PMgetTitleInBrowserAttribute on your faq model23r01nf1n17y
04/03/2022, 8:27 PMGvido Blue Fox
04/04/2022, 3:11 PMGvido Blue Fox
04/04/2022, 3:11 PMHarings Rob
04/04/2022, 3:20 PM24kappa
04/05/2022, 10:01 AM$news->translate('en', true)->title
Im reading astrotomic documentation:
https://docs.astrotomic.info/laravel-translatable/package/methods#get-an-instance-of-the-translation-modelifox
04/05/2022, 10:03 AM24kappa
04/05/2022, 10:03 AM@foreach($block->getRelated('news') as $news)24kappa
04/05/2022, 10:06 AMNews component on my pagesifox
04/05/2022, 10:11 AMifox
04/05/2022, 10:12 AMifox
04/05/2022, 10:13 AM24kappa
04/05/2022, 10:13 AMifox
04/05/2022, 10:13 AM24kappa
04/05/2022, 10:16 AMifox
04/05/2022, 10:19 AMit is active while en is not. Active is not something the laravel-translatable understands on its own, it's something that Twill introduced to manage the publication of individual languages within a single record. So you can't leverage this to fallback as you would expect, which I definitely realize is unfortunate. You can however use a global fallback strategy with this package. Did you want to fallback only for this specific case?ifox
04/05/2022, 10:20 AMifox
04/05/2022, 10:20 AMifox
04/05/2022, 10:21 AM$news->title and it will fallback automatically24kappa
04/05/2022, 10:22 AM24kappa
04/05/2022, 10:22 AMifox
04/05/2022, 10:24 AMifox
04/05/2022, 10:29 AM24kappa
04/05/2022, 10:30 AM24kappa
04/05/2022, 10:31 AMRoute::group(['prefix' => '{lang?}', 'middleware' => 'language'], function ($lang) {24kappa
04/05/2022, 10:31 AM