This might be a really silly question, but is there a way to insert content from a web app into the site’s stylesheet?
@bridge3196 I don’t know the answer to your query but instead of trying to add it to the site’s style sheet, you should be able to add it to the of a template with a tag. I haven’t tried it but I don’t see why it wouldn’t work.
Currently Liquid doesn’t work in other files like .css and .js files, but like @hopestew said you can just insert the styles onto your page or layout.
For example something like the below directly in your list/detail layout:
<style>
.your-class {
color: {{this.css-color}};
}
</style>
PS: there is a backlog item for Liquid to work in other text-based files - which would be fantastic - so if you have any votes spare consider adding one to this:
https://treepl.co/public-backlog-state/request/liquid-parser-inside-text-based-files
@bridge3196… Yes!
You can’t inject new styles directly into an existing css file. But you can add…
<style>
{“insert your custom module layout here”}</style>
to the top of the document body.
So… your custom module (webapp) will look something like this:
etc…
… and your module layout will look something like this…
etc…
…which will output something like this…
The site demonstrated here is updated every month by the client with a new colour theme to match their print publication. See http://www.nztruckanddriver.co.nz/ and select ‘Magazine’ dropdown from main menu to cycle through the multiple variations. Each month has unique css values populated via the webapp. Hope that helps.
Thank you everyone! I appreciate the feedback.