MashZone NextGen 10.2 | Appendix | Legacy Presto components | Mashables and Mashups | Views for Mashups and Mashables | Built-in MashZone NextGen Views | Template View | Use CSS in Template Code
 
Use CSS in Template Code
You can use CSS as local styles using the style attribute directly on any HTML element in a template. For example:
You can also use the class attribute to refer to CSS classes defined in external CSS stylesheets. You must include <link> elements in the template to link to any external CSS stylesheets.
External CSS stylesheets used in templates must either:
*Have a fully-qualified URL where the stylesheet is hosted. For example:
<div>
<link type="text/css" rel="stylesheet"
href="http://www.jackbe.com/prestodocs/v3.0/prestodocs.css"/>
<div
>
<div
>View Title</div>
...
</div>
</div>
Generally, you should use this option for external stylesheets hosted by third parties or custom stylesheets for your organization that are hosted outside of MashZone NextGen. Hosting custom stylesheets for your organization in the MashZone NextGen or MashZone NextGen Hub web applications is not recommended as this complicates deployment and upgrade migrations.
*Have been uploaded to MashZone NextGen and use a MashZone NextGen URL.
This option is recommended for custom stylesheets for your organization or from third-parties when they cannot be hosted outside of MashZone NextGen or these resources should be available for use in any custom view.
Note: External resources can only be uploaded to MashZone NextGen by MashZone NextGen administrators.
This example links to a stylesheet that has been uploaded to MashZone NextGen. The full path for this URL is defined when the resource is uploaded, but is generally in the form http:app-server:port/mashzone/files/filename:
<div>
<link type="text/css" rel="stylesheet"
href="http://localhost:8080/mashzone/files/myView.css"/>
<div
>
...
</div>
</div>

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release