Adding a widget, without using the admin dashboard #14892
Replies: 1 comment
-
Fixed by making a change near the end of the recipe. Replaced this:
with this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a widget content type, zone, and layer, all called Footer. I can easily add a Footer widget to the Footer zone via the admin dashboard (Design > Widgets > Add Widget).
But for my use case, I can't use the admin dashboard. Customers use our application to create their own sites, and the widget needs to be added automatically, during site creation or immediately afterwards.
Ideally, I'd like to do this in the recipe.json file. If that's not possible, I could do it in C# code, in an endpoint that I call after a site is created. I just need to have it happen automatically, without someone going into the admin dashboard.
When I create a site with my current recipe (relevant parts shown below), it creates the Footer content type, Footer content item, Footer zone, and Footer layer. But in the dashboard when I go to Design > Widgets, the widget is not in the zone.
Beta Was this translation helpful? Give feedback.
All reactions