Page Module - Custom Fields, Not working
I have watched the video and followed the instructions to a tee, but I am not seeing the fields show in the edit or create forms.
What is really strange is it doesn't appear that the Page create/edit screens are using the partial views from itself. When I make any change to Page->Resources->views->admin->partials->create-fields.blade.php directly I don't see the change in the form at all. Even adding a <h1>Hello World</h1> won't display. I can even delete the partials from the Page module admin views and clear all caches and the page still loads with the default form.
I am slightly mystified by how the create and edit forms load the HTML, I am confident it isn't from views->admin->partials. Which is where the code to look for settings in the config for custom fields lives.
Curious about this too....
I've brought a working PageExtensions module, from a 2.x version of AsgardCMS I had setup for another project. It does not work anymore in 3.x.
There is for sure something not aligned in the documentation / video. Does anyone have any insights? Will post if I find anything, but so far no luck.
How can you extend the form views in Page and User modules now that they are all ajaxy with Vue
Here's how I added a custom field to the Admin Pages:
- console "npm install" at the root of the project
- console cd to Themes/Adminlte and "npm install"
- create your db migration (I added a field to the page module) and migrate
- in the partials for the Page module add your field to edit and create blades
- in Modules->Page->Assets->js->components edit the 3 .vue files to add the new field
- console cd to root of project "php artisan asgard:module:publish Page"
- console cd to Themes/Adminlte and "npm run watch"
- console cd to root of project "npm run watch"
- house keeping "php artisan cache:clear" and "php artisan view:clear"
You should now see your field in the create and edit of the backend of your site. Remember to add the translation if the field is translatable.
@jdkman Won't this break when/if the Page module is updated?