Skip to content

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

Answered by Smilefounder
shokufe asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Smilefounder
Comment options

You must be logged in to vote
2 replies
@nhathoang989
Comment options

@Smilefounder
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants