Twill CMS

TC

Twill CMS

Join the community to ask questions about Twill CMS and get answers from other members.

Join

hideActiveCrop() Not Working in Twill 3.x

Hi, I'm using Twill 3 and trying to disable the cropping option with hideActiveCrop() as shown in the docs https://twillcms.com/docs/api/3.x/A17/Twill/Services/Forms/Fields/Medias.html#method_hideActiveCrop, but it's not working. here's my code ...
No description

Automatically make languages live/remove user control

Use case - on a bilingual site I need to make both configured languages live by default for any item (including settings). I'd also ideally like to remove the ability for admin users to edit this at all. I've spotted a variable called $controlLanguagesPublication in the form layout which seems to hide the language active controls, and am using View::share in AppServiceProvider to globally force this to false . However this seems slightly brutal and I'm not sure if there might be any side effects. Also this doesn't solve selecting all languages as active by default (although I guess I could probably figure that out during save) Could anyone possibly confirm the best way to achieve this?...

Signed urls for File library

Hello, I'm working with the file library, and the documentation suggests setting the ACL to read-only. However, I was wondering if there is a way to use S3 configuration with signed URLs in the file library instead? I prefer not to have the S3 bucket set to a read-only ACL, so I believe using signed URLs could be a good solution. If signed URLs aren’t possible, is there another way to handle this? For example, could we modify only the file URLs to point to CloudFront instead?...

Extending the functionality of the WYSIWYG editor with the quill type

The quill editor is used. How can I add a create table button? and your own custom button, for example, to wrap part of the text in certain tags.

Image File not Found

Hello . I have a new installation of twill using version 3.3. I run into this error when loading media library navigation. The images get uploaded successfully but do not display [2024-08-20 18:43:03] local.ERROR: Could not find the image `1a437793-b32d-41a8-b18d-ced69955c6aa/image.png`. {"exception":"[object] (League\\Glide\\Filesystem\\FileNotFoundException(code: 0): Could not find the image `1a437793-b32d-41a8-b18d-ced69955c6aa/image.png`. ...

Block editor not showing saved content.

In my app i have a product model with the HasBlocks trait and a product repository with the HandleBlocks trait. For some reason the blockeditor is always empty when i visit it. but the data for it is present in the database. am i forgetting a step ? ```php class Product extends Model implements Sortable {...
No description

Modifying data in a block with a browser field

Good morning! Tell me how you can process the data that is loaded into the browser field in the block? I have an entity called News. I added a block whose Authors I select through the browser field. I have authors who have the Add field by default. I need when I load authors into a browser field so that the authors with the default field are already selected (checkbox).

Missing preview view,

i'm triying to use the preview button, bit i receive de message "Missing preview view, create one at" and i have a view with the name of the module
No description

install twill with docker and wsl

I am trying to install twill using docker with wsl in windows. I installed and project is working properly but media query is not working properly while adding it shows me broken images. Can you give me proper steps to create docker installation and access the media query

using Laravel native auth?

Hi, I've installed TwillCMS alongside my current site in a feature branch, and amended the settings to use my current users table. Is there a way to also share the auth from my native laravel 11 site with Twill so that my users don't have to log in twice to edit the site data? To put some more context: current native login takes them to a dashboard where I have all of their membership details and for certain users and roles to be able to edit a few things on the site frontend like prices, etc. I want Twill for the ability to edit page content like my users are used to in Wordpress....

Preview doesn't work

I need to open the preview but i get this error "Your submission could not be validated, please fix and retry".I have created the revision for my model, also have generated the preview when i first created the model, but i don't know what else to do.
No description

Related page is null in translated menu items (following guide)

I followed this: https://twillcms.com/guides/page-builder-with-blade/adding-navigation.html - I have menu component with translatable title and non translatable related page field. - In my primary locale: $link->getRelated('page') works so I can do ->first()->slug() with no problems. - In my secondary locale I get the items with translated titles but $link->getRelated('page') is null....

block->imagesAsArraysWithCrops('image_set') gives objects with empty alt and caption

…even though those fields are filled up in Media library for those images. Edit: I was making some tests with blocks containing medias and there is no more medias at all after saving block with medias. I see saved images but in preview there is no $block->medias and $block->imagesAsArraysWithCrops('cover') returns empty array… Everything seems to be broken....

How to set datepicker default?

I try to set current date for datepicker as default but can't get any results: DatePicker::make()->name('date')->label(__('Date'))->time24Hr(true)->allowInput(true)->default(HOW?) There are no docs on this topic....

Can I change WYSIWYG editor behaviour to use classes instead of style attributes for text align?

There is no way I would ever allow editors to use "style" tag in their HTML content… (Btw. "align" button in quill is not working at all)

Is it possible to use Twill with Twig (rcrowe) for frontend (block and module templates)?

… Blade is the antithesis of what template engine should be and I really don't get it why such a great framework like Laravel choose to support it natively. So is is possible to avoid it while creating block and module templates in Twill?

Admin route not working in Twill 3.3 + Laravel 11

On fresh install of Laravel 10 everything works without any problem. On fresh install of Laravel 11 /admin route throws 404. Nothing changes after manually providing url in .env or twill.php. Seems to be Laravel 11 related.

Show Image Medias on Laravel + Vue 3 Inertia JS Frontend

Can someone tell me how to display media images on Vue's frontend? As far as I understand, if I use Blade PHP, I just need to call the images using
->images(string $role, string $crop = 'default', array $params = [])
->images(string $role, string $crop = 'default', array $params = [])
. However, how do I implement the same functionality in Vue? Here is my code.
No description

Adding fields to create modal

Hi, i need the permalink to also take the last name, cause right now it takes just the first name, but i don't know how to pass the last name. Any ideas how can i achieve this? public function getCreateForm(): Form { return Form::make([ Input::make()...