Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Theme setup recipe #715

Closed
agriffard opened this issue Apr 20, 2017 · 3 comments
Closed

Feature: Theme setup recipe #715

agriffard opened this issue Apr 20, 2017 · 3 comments

Comments

@agriffard
Copy link
Member

May be I am a little too optimistic about the technical feasibility but here is the description of what I would love to be able to do when I install a theme:

  • Allow to execute a 'setup' recipe in Theme.
    • Include parameterized steps in which you retrieve informations that are passed to execution.
  • Create Content type and data.
    • Detect if Content type already exists.
  • Enable dependent modules and features
    • About page
    • Blog
      • RSS Feed
    • Comments: Disqus
    • Contact form
  • Initialize settings, configure custom parameters.
    • Analytics: Google
    • Contact page: Email, Address
    • Image: Upload Avatar, Logo
    • Social media: Twitter, Linkedin
    • Theme: Layout, Menu, Widgets

Are some of those customizations possible with the setup wizard #495 that @jersiovic is developing and configurable when you select a theme?

Or could it be done by independent small recipes in each module?

@sebastienros
Copy link
Member

Not crazy at all.
It's also related to the other issue I made to allow parameters in recipes. Two solutions:

  • describe which properties we need from the recipe and let the setup build the ui
  • provide a driver and shape template for the setup explicitly

Either way you can then run you own recipe that will take these parameters into account.
Also the Setup module exposes custom events that any module/theme can intercept. Many already do it.

If you meant from the admin and not from the Setup, then it's still doable, we need to expose recipes from all modules, like we do in O1, and make the same UI extensibility.

@jersiovic
Copy link
Contributor

I think the driver and shape template approach is better cause it is more powerful than let setup build the ui and neither require any extra knowledge to use it nor having to develop and maintain specific code for every new parameter type we need.
@agriffard this approach #716 pointed by @sebastienros maybe is the most sensible for implementing it.
Related to the Setup wizard issue I'm going to close the PR as I have commented here: #495 (comment)

@agriffard
Copy link
Member Author

As most recipes are now in themes, it would be interesting to allow to execute a recipe from the themes admin page but this execution should be able to check if a Content type has previously been created and prevent to override it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants