Umbraco-CMS/templates at contrib 路 umbra...
m
Hi everyone, I have a issue. How can i use 'Umbraco.Templates' projects from Source Code? https://github.com/umbraco/Umbraco-CMS/tree/contrib/templates
s
I believe these are the templates you would use when starting a new project with
dotnet new
like so: https://docs.umbraco.com/umbraco-cms/fundamentals/setup/install/install-umbraco-with-templates
What exactly is it you're trying to do though?
m
I want to be able to customize
Umbraco.templates
to edit more styles for the
Login screen
or
Umbraco.Web.Ui.Client
. In the source code, I see that it can be run directly in
Umbraco.Web.UI
, so can I build my own
.template.config
to customize it?
s
Have you looked at this doc about customising the login: https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/login
I don't think you'd want to go down the route of modifying the Umbraco source or doing your own builds just for that
m
I have read the documentation, and I need to customize the Login screen more than what the documentation provides in terms of
layout
and
style
. I prefer the
Umbraco.Templates
template that has been pushed to nuget public (
dotnet new install Umbraco.Templates::13.4.1 --force
), and I see that there is a project in the source with a similar name "Umbraco.Templates". So I want to know if it is possible to customize it, because if it is possible, I can just create a local nuget to install the application concisely (instead of having to use the entire source code to be able to customize freely, which is not recommended)
I have changed the UI of the
Umbraco.Web.UI.Login
project. Then I built it according to the documentation to create local nuget packages. But when I run
dotnet new umbraco...
, it doesn't recognize the changes I made to the Login screen.
dotnet new install Build.Out/Umbraco.Templates.13.4.1.nupkg
HOW CAN I FIX IT? https://cdn.discordapp.com/attachments/1263684730319147039/1263774496435863663/image.png?ex=669b7537&is=669a23b7&hm=0a1fc38f2576393494bbc176bdd8cd53d49d40e5cebcd51b693018c33849b09e& https://cdn.discordapp.com/attachments/1263684730319147039/1263774496809287801/image.png?ex=669b7537&is=669a23b7&hm=d47ca9b2ffea2e385f144708a6e9c28ee227f77f19a2abd53668902ac12bc3ab&
s
I'm not too familiar with the template/NuGet source builds to be able to answer that I'm afraid. But personally, if it's just layout and styles, I would still be looking for a way to extend/override the existing UI component (and then that could be packaged up itself). Hopefully someone with better knowledge of the codebase than me can answer you 馃檪
m
It will be really difficult to edit it just by opening the extent. I know that when I build
Umbraco.Web.Ui.Login
, it will be generated into
Umbraco.Cms.StaticAssets
. But I don't understand how to add it to
Umbraco.Templates
. This StaticAssets section will only be generated when running the website to the
/umbraco/login
link, so I don't know where it is in the local nuget packages. Do I have to install each nuget package manually? https://cdn.discordapp.com/attachments/1263684730319147039/1263801171211063388/image.png?ex=669b8e0f&is=669a3c8f&hm=eed252d894adb4a62d739f3d8d1eef4d217242a661408d7343bb6174cb5331da&
j
This approach is not impossible, but you are in for a world of pain trying to get it working. Rather than try and have custom builds of the bits you want to customise, I'd look at overriding what you don't like with middleware and ship that in your own nuget package. If you really want to use .NET project templates then you can package up your own template that's based on the default Umbraco plus your package containing customisations/overrides. Though, even that's going to be a pain to maintain in conjunction with Umbraco's versionning strategy and release cadence.
m
Thank for replying, Mr Jason! I've done that using local Nugets. As you mentioned, I modified the GitHub source code and generated local Nugets in Build.Out myself. I also mentioned the reason I had to do this was because I had to customize the login screen and fix the monotonous layout of the BackOffice (almost just changing the interface). The documentation gives us very few ways to interact to change that login screen (it can almost only be done on the properties provided by Umbraco, it is not possible to interfere with complex layouts and positions) I wish the
Umbraco.Web.UI.Login
frontend part could be extracted independently so that it could be easily modified when installed from a template. After all, it's a web component that uses Lit and Vitejs.
2 Views