Open RibesAlexandre opened 1 year ago
I'll look into it!
@RibesAlexandre public static function getTemplateSchemas(): array { return static::getTemplateClasses() ->map(fn ($class) => Group::make($class::schema()) ->afterStateHydrated(fn ($component, $state) => $component->getChildComponentContainer()->fill($state)) ->statePath('data.content'. str_replace('\', '', $class)) ---------------> this is the solution ->visible(fn ($get) => $get('data.template') === $class) ) ->toArray(); }
-this line of code will solve it ( ->statePath('data.content'. str_replace('\', '', $class)) ) -you can find this function in vendor\beier\filament-pages\src\Filament\Resources\FilamentPageResource.php
Hi,
I have 2 templates, one is the home page and the other is a section template. When I save my second page, all the data from the home page is kept in the "data" column in DB, with a null value.
This is my homePage values :
And this is my page section :
We can see that all the fields of the home page have been kept.
Thanks for help,