Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Static content bundles for Theme Cosmos

Updated on December 13, 2022

By default, Theme Cosmos applications include script and style static content bundles that you can use to introduce global customizations to your application. Depending on the scope of changes and your preferences, you can either add your own JS and CSS files to the bundle, or expand the existing bundle files.

Static resources

Theme Cosmos applications include the following static content bundles and resources out-of-the-box:

py-cosmos-custom-script
Static content bundle holding JavaScript files that apply globally to the application. The bundle includes the py-cosmos-custom-js file by default.
py-cosmos-custom-js
Text file rule holding custom JavaScript code that applies globally to the application.
py-cosmos-custom-styles
Static content bundle holding CSS files that apply globally to the application. The bundle includes the py-cosmos-custom-css file by default.
py-cosmos-custom-css
Text file rule holding custom CSS markup that applies globally to the application.

Best practices

When using static content bundles, consider the following best practices:

  • For minor adjustments, add the changes directly to the py-cosmos-custom-js or py-cosmos-custom-css files. The files are already included in their respective bundles, so no other action is required.
  • For large changes, create a text file rule to hold the custom markup, and then add that file to the script or style bundle, as required. This approach keeps text file rules that are bundled distinct and shorter, which simplifies maintenance.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us