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

Upload Theme Packages #8346

Closed
JoshTango opened this issue Jan 18, 2021 · 7 comments
Closed

Upload Theme Packages #8346

JoshTango opened this issue Jan 18, 2021 · 7 comments

Comments

@JoshTango
Copy link

I think Orchard Core really needs the ability to upload a theme package if it is to compete with other CMS’s on the market.
I am just going to take a stab at a possible implementation.

  1. Create a built in Stub Theme which would be empty and have no views or anything at all
  2. The Stub Theme would NOT be selectable or visible from UI
  3. Users would upload a compressed theme package file with views and icons and config file and whatever else is needed.
  4. When someone chooses to make an uploaded theme their current theme, Orchard would set the Stub Theme to the current theme.
  5. Obviously, nothing would show up because the stub theme is empty
  6. This is where the package file comes in.
  7. When on the Stub Theme, assuming there is a cascading algorithm, then you would change the algorithm to look for the view in the package file first before cascading downwards.
  8. I assume the current package file would need to be cached for performance issues
  9. Maybe you do not even need a stub theme?

You guys would know best how to implement it. This is just to communicate the idea.
considered.

@Piedone
Copy link
Member

Piedone commented Jan 20, 2021

Something similar was available for Orchard 1 both for modules and themes. I've never really seen the appeal though: installing a plugin into your deployed app on the fly is very risky. Then you also have to somehow have a downstream option to keep these plugins by e.g. somehow exporting them, so you can move the site's configuration to another place like running it locally.

If Orchard would be an app that you just use, even if you host it yourself, like TeamCity, I'd agree this could be useful. However, Orchard is rather used as an application platform where you also develop your own app with it.

@Skrypt
Copy link
Contributor

Skrypt commented Jan 22, 2021

This could potentially work if we would/could be using Admin Liquid Templates for everything. Then the assets could also be editable through the media gallery or something like it.

Let's say we start from a "blank" frontend theme. All we would need is create a recipe that creates Liquid templates stored in the DB. And bundle some assets in a .rar file? That's how for example Shopify works ... So, in this case we don't talk about changing the server side theme but to allow to edit the current one from the admin UI.

@Piedone
Copy link
Member

Piedone commented Jun 13, 2023

BTW Lombiq Hosting - Media Theme for Orchard Core is something like what you envision.

@sebastienros sebastienros added this to the backlog milestone Jul 6, 2023
@Piedone
Copy link
Member

Piedone commented Apr 28, 2024

For all intents and purposes, the previously linked Media Theme covers this. I don't think we'll ever have a feature to upload actual theme packages with C# code files, since that would entail modifying and recompiling the application while it's running, which while technically possible, would be risky and also unnecessary due to what I've written under #8346 (comment).

What's that's not covered for you by Media Theme, the built-in way of editing templates (and uploading CSS/JS files) from the admin, or by the GrapeJS HTML Editor?

Related: #3279

@hyzx86
Copy link
Contributor

hyzx86 commented May 6, 2024

Regardless of security, if you want to develop this feature, you can refer to this code.

https://github.com/EasyOC/EasyOC.Modules/blob/main/src/Modules/EasyOC.AssemblyLoader/ExternalModuleNamesProvider.cs

Copy link

It seems that this issue didn't really move for quite a while. Is this something you'd like to revisit any time soon or should we close? Please reply.

@github-actions github-actions bot added the stale label May 24, 2024
Copy link

github-actions bot commented Jun 7, 2024

Closing this issue because it didn't receive further feedback from the author for very long. If you think this is still relevant, feel free to reopen it with the requested details.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants