Twill CMS

TC

Twill CMS

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

Join

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()...

Overriding default dashboard styling

Hello, I'm not really sure how to go about this really; I want to override certain styles on the dashboard itself( /admin), for example the header & navbar background color. What is the easiest way without re-compiling Vue or CSS assets?...

Missing docs for translated nested modules

i had problems with translated nested slugs: even if they work as intended the child will always take the parent component in the default language in the slug. After a lot of fiddling and reverse enginnering i came with a solution: https://twillcms.com/docs/modules/nested-modules.html#content-working-with-self-nested-items...

Remove title field from edit modal

Hi, i'm new at twill and i need to remove the title field from the edit modal. Can anyone help me with suggestion on how to do it?
No description

On update the images disappear

All the images that i use in my project, like the images from blocks, or the image of module the first time that i upload them and click update or okay, after i click update again disappear. The first time they are saved with url and than after update i get something else. The first time in db the ration are saved okay after the update they get saved as tablet. I open for suggestions since i don't know what to do....
No description

Images getting randomly removed when saving

I am working on a singleton with multiple medias fields, When i click the 'save as draft' button or the 'publish' button everything will get saved perfectly. Images does show in the frontend. but when i click save for a second time, some random number of images will get removed from selection. I checked the twill_mediables table in the db, rows are also getting removed from there. ...

Seeding settings

On a fresh DB after a migrate:fresh --seed calling TwillAppSettings::get gives me a Illuminate\Support\ItemNotFoundException error. I was hoping to seed them via a migration or seeder or set default values but can't see anything obvious to do so in the docs.

Singleton - has no index

Hi, i'm working with twill and i need to create a singleton, but i navigate to the link i get this "Blog has no index" ,i have also done the seeded command, this is my code <?php namespace App\Http\Controllers\Twill; ...

Can't upload SVGs

I'm new at twill and i'm trying to upload svg at medial library, but i't doesn't work, after some seconds it shows this XHR returned response code 500.This is my code at twill config 'media_library' => [ 'allowed_extensions' => ['svg', 'jpg', 'gif', 'png', 'jpeg', 'webp'], ], ...

Currently only 3 levels are supported for getting settings.

I am currently trying to add a new setting where someone who is managing the backend can select a certain amount of destinations that they want to show on the home page. However, the error I am getting is "Currently only 3 levels are supported for getting settings." - is there any specific reason this may occur? Using Twill3 - latest version....
Current route for destinations

php artisan twill:build - failed

i tried to run php artisan twill:build but i get this error, i changed the node verison but it didn't help

Twill navigation group

Hi, i'm new at twill and i'm trying to do grouping by title in the primary navigation which is not module, but i'm getting an error.Any help would be appreciated. Route [twill.navigation.index] not defined. (View: C:\xampp\htdocs\twill-skeleton\vendor\area17\twill\views\partials\navigation_overlay_navigation.blade.php) (View: C:\xampp\htdocs\twill-skeleton\vendor\area17\twill\views\partials\navigation_overlay_navigation.blade.php) (View: C:\xampp\htdocs\twill-skeleton\vendor\area17\twill\views\partials\navigation_overlay_navigation.blade.php) This is my code, i have tried it both ways with 'twill.navigation.index' and 'admin.navigation.index' ...
Next