Can I retrieve the style part of a template from API? If not is there any way to add my CSS and retrieve it from API? #336
-
Hi, first thanks for your powerful CMS. I have a question, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @shokufe Yes, can. It is part from Model.View.Styles . You can ref from the sample code below: @model Mix.Cms.Lib.ViewModels.MixModules.ReadMvcViewModel
@await Html.PartialAsync(Model.TemplatePath, Model)
@Html.Raw(Model.View.Scripts)
@Html.Raw(Model.View.Styles) Example: https://dev.mixcore.org/api/v1/rest/en-us/mix-page/mvc/7 |
Beta Was this translation helpful? Give feedback.
-
hi Huy, thanks for your answer. but when I added a new style it's still empty. I put an image here |
Beta Was this translation helpful? Give feedback.
Hi @shokufe Yes, can. It is part from Model.View.Styles . You can ref from the sample code below:
Example: https://dev.mixcore.org/api/v1/rest/en-us/mix-page/mvc/7