Hello,
I am curious to know whether it is possible to change the theme of a certain UI compenent inside of a plugin. For example, if I want to write a plugin to change the CSS of the user-bar component only when several conditions are met, is it possible to have the plugin point to a new FTL file?
Any help would be appreciated.
Chris
Hi Chris,
It is possible to get the result that you want. In your plugin, create a struts action that renders some css based on the conditions you are checking. In your theme's /template/decorator/default/template.ftl put the following line in the head of the page (next to the system's identical "custom-css" line):
<style type="text/css"><@s.action name='your-plugin-css-action' executeResult='true' ignoreContextParams='true' /></style>
You might want to look at using freemarker from within /template/global/custom-css.ftl to check your conditions directly. Depending on what you're trying to do, you may be able to avoid having to create the struts action in the plugin.
-Jon
Expert Jive Customization
Thanks for the info Jon! I had originally thought of just writing some FTL code, but found that what I was wanting to do was a little too complex for Freemarker.
Jive combines the most powerful features of collaboration software, community software,
social networking software & social media monitoring into the leading SBS solution.
© Copyright 2000–2010 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205
Sales: 877-495-3700 | General: 503-295-3700
Privacy Policy | Sitemap | Jobs | Contact Us