CSS Serialization Type

Ashley Williams's Avatar

Ashley Williams

20 May, 2016 02:42 PM

Hello,

We'd like to output a custom CSS stylesheet that's generated based on user input. I'm comfortable with setting up the page to output this, up until the point where I'm not sure which serialization type to use for the output. Our current options are HTML, XML, PDF, and RTF. I've seen people mention CSS on the forum, but we might not have it since we're still on v7.10? If that's the case, is there a way for us to output CSS at all before upgrading, and what's the best method?

Thanks!

  1. 1 Posted by Ryan Griffith on 20 May, 2016 02:47 PM

    Ryan Griffith's Avatar

    Hi Ashley,

    You should still be able to accomplish the CSS output using the XML output, just give it a .css file extension.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by Ashley Williams on 20 May, 2016 03:51 PM

    Ashley Williams's Avatar

    Thanks Ryan! I tried this and it mostly works, but there are opening and closing system-region name="DEFAULT" tags around the output.

  3. 3 Posted by Ryan Griffith on 20 May, 2016 05:05 PM

    Ryan Griffith's Avatar

    Hi Ashley,

    What you will want to do is use a combination of #cascade-skip and #protect-top code sections in order to generate non-XML content. Check out my response to this similar discussion for additional information on how to set up your Template and Format.

    Please let me know if you have any questions.

    Thanks!

  4. 4 Posted by Ashley Williams on 20 May, 2016 06:32 PM

    Ashley Williams's Avatar

    The CSS is outside of the system-region tags now, but they're at the end of the document. I've attached my template, the CSS output, and the format I'm using for reference.

  5. 5 Posted by Ashley Williams on 23 May, 2016 01:35 PM

    Ashley Williams's Avatar

    Nevermind, figured out that my template wasn't switched on a specific configuration. Thanks!

  6. Ashley Williams closed this discussion on 23 May, 2016 01:35 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM