[rt-devel] CSS/JS Files adding from Plugin

Kevin Falcone falcone at bestpractical.com
Fri Jun 7 12:27:03 EDT 2013


On Fri, Jun 07, 2013 at 12:52:25PM +0000, Brumm, Torsten / Kuehne + Nagel / Ham GI-ID wrote:
>    whats the best way to add custom css/js files from a plugin into RT?
> 
>    From customizing doc ([1]http://bestpractical.com/rt/docs/4.0/customizing/styling_rt.html) it
>    is recommended to
> 
>    Set( @CSSFiles, ('my-site.css') );
> 
>    But in many Extensions I find this way:
> 
>    RT->AddStyleSheets('module.css')
> 
>    RT->AddJavaScript("module.js");
> 
>    Called from the Extension::Module.pm
> 
>    Are both working the same way? Will both ways minified?

Those docs should also be linking to
http://bestpractical.com/rt/docs/latest/RT.html#AddStyleSheets
which is RT->AddStyleSheets

If you're an admin who is just adding a new css or js file, but not
writing an extension, then use @CSSFiles.  If you're writing an
extension, use the RT-> methods.

They both minify.

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20130607/d170fca2/attachment.pgp>


More information about the rt-devel mailing list