Difference between revisions of "AddCustomStyleSheet"

From Request Tracker Wiki
Jump to navigation Jump to search
m (2 revisions imported)
 
(Formatting fix for header code.)
 
Line 27: Line 27:
allows one to add 'Stylesheet = "/path/to/stylesheet"' to the call to the header component on any given page. I've been using this to add some styles needed for some custom input forms I've been doing. A sample call at the top of one of my forms is:
allows one to add 'Stylesheet = "/path/to/stylesheet"' to the call to the header component on any given page. I've been using this to add some styles needed for some custom input forms I've been doing. A sample call at the top of one of my forms is:


<& Elements/Header, Title => "Phone Install/Feature Change Request",
    <& Elements/Header, Title => "Phone Install/Feature Change Request",
      Stylesheet =&gt; "$RT::WebPath/Forms/css/forms.css" &amp;&gt;
          Stylesheet => "$RT::WebPath/Forms/css/forms.css" &>
 


= See also =
= See also =


[[CustomizingWithCallbacks]]
[[CustomizingWithCallbacks]]

Latest revision as of 12:57, 20 August 2017

Using a Callback to Add a StyleSheet (Chuck Boeheim, Gary Oberbrunner)

As of 3.8.2 at least, you can add things to main.css by putting them in

/opt/rt3/local/html/Callbacks/ANYTHING/NoAuth/css/web2/main.css/End

and anything you put there will get stuffed into main-squished.css.

Here's the older text that was on this page, for reference:

=

There isn't currently a place provided to load an additional stylesheet in the header processing, but there is a general Header callback.

Putting the following file in /opt/rt3/local/html/Callbacks/SLAC/Elements/Header/Head

%# SLAC Addition to load another stylesheet on request.
<%args>
$Stylesheet => undef
</%args>
<!-- Local header included -->
% if ($Stylesheet) {
  <link rel="stylesheet" href="<% $Stylesheet %>" type="text/css" />
% }

allows one to add 'Stylesheet = "/path/to/stylesheet"' to the call to the header component on any given page. I've been using this to add some styles needed for some custom input forms I've been doing. A sample call at the top of one of my forms is:

   <& Elements/Header, Title => "Phone Install/Feature Change Request",
         Stylesheet => "$RT::WebPath/Forms/css/forms.css" &>


See also

CustomizingWithCallbacks