Custom Vue.js component outside of a form
Summary
I have to create a custom Vue.js component which will handle the whole form, data processing. If I create a component now, it only works within the contentFields.
Describe the solution you'd like
It would be nice, if it worked within a customPageContent, like this: `@extends('twill::layouts.free')
@section('customPageContent')
It would be still acceptable solution if I had to insert some extra js including, like this:@push('extra_js_head')
@if(app()->isProduction())
@endif
@endpush`
A solution for this was provided by @pboivin on Discord for another developer in the past:
You can copy this file into your project: https://github.com/area17/twill/blob/2.x/views/layouts/free.blade.php in
resources/views/admin/layouts/free.blade.phpEdit lines 7 and 31 to loadmain-form.jsinstead ofmain-free.js. This will ensure that your custom components are loaded in your custom page. Then, you can extend your custom layout instead oftwill::layouts.free:@extends('admin.layouts.free') @section('customPageContent') <a17-hello-world name="World"></a17-hello-world> @stop
We should however address this by loading custom components in the build for free pages.