savchuk.ivan
savchuk.ivan
TCTwill CMS
Created by savchuk.ivan on 5/23/2023 in #👊support
Slows down the page after saving the @formConnectedFields field
Good afternoon I have several roles to which I want to attach the ability to select certain actions (publishing a post, unpublishing, for example). The problem is that after saving, when you click on the checkbox again, the page slows down and crashes with an error that the page is not responding. I also found a problem that if you save a user with a role, for example, an administrator, then the saved field is displayed under the role, for example, a reader (that is, there must be an understanding that the saved fields belong to a particular role). @formField('select', [ 'name' => "role", 'label' => twillTrans('twill::lang.user-management.role'), 'options' => $roleList, 'placeholder' => twillTrans('twill::lang.user-management.role-placeholder'), ]) @formConnectedFields([ 'fieldName' => 'role', 'fieldValues' => ['ADMIN'], 'renderForBlocks' => false, ]) @formField('checkboxes', [ 'name' => 'privilege', 'label' => 'Привилегии', 'inline' => false, 'options' => \App\Domain\Enum\PrivilegeType::values(), ]) @endformConnectedFields @formConnectedFields([ 'fieldName' => 'role', 'fieldValues' => ['READER'], 'renderForBlocks' => false, ]) @formField('checkboxes', [ 'name' => 'privilege', 'label' => 'Привилегии', 'inline' => false, 'options' => \App\Domain\Enum\PrivilegeType::values(), ]) @endformConnectedFields
1 replies
TCTwill CMS
Created by savchuk.ivan on 5/23/2023 in #👊support
Checked checkboxes by default
No description
2 replies
TCTwill CMS
Created by savchuk.ivan on 3/15/2023 in #👊support
Adding a vue component
No description
1 replies
TCTwill CMS
Created by savchuk.ivan on 2/4/2023 in #👊support
Problem with displaying headers if the site is in two languages
No description
3 replies
TCTwill CMS
Created by savchuk.ivan on 11/30/2022 in #👊support
Get link to file in media library
6 replies
TCTwill CMS
Created by savchuk.ivan on 10/24/2022 in #👊support
Can you please tell me how to work with the getData method in the block?
Good evening guys! Can you please tell me how to work with the getData method in the block? I have a translatable field where I need to get the last word and insert it separately into a block template. public function getData(array $data, \A17\Twill\Models\Block $block): array { $data = parent::getData($data, $block); $words = explode(' ', $block->translatedinput('title ')); **$data['last_word']** = array_pop($words); return $data; } And here I need to get this element: <h1 class="main-section_title"> {!! $block->translatedinput('title') !!}<br/><span class="text-accent-01">**{!! $block->translatedinput(last_word)** !!}</span></h1>
9 replies