<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;h2&gt;&lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; and script shortcuts&lt;/h2&gt;
&lt;p&gt;The following are useful to keep paths for scripts and &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt; all in one place.  Example:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
    &amp;lt;st:script src=&quot;jquery.js&quot;/&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Becomes:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;/myapp/static/scripts/jquery.js&quot;&amp;gt; &amp;lt;/script&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Code:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
    seethrough.processors['http://hyperstruct.net/seethrough#js::css'] = 
        function(attrValue) {
        return function stScript(element, env, children) {
            var cssPath = '/myapp/static/style/' + element.@href;
            return &amp;lt;link rel=&quot;stylesheet&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot; 
                href={cssPath} type=&quot;text/css&quot;/&amp;gt;;
        }
    };
    
    seethrough.processors['http://hyperstruct.net/seethrough#js::script'] = 
        function(attrValue) {
        return function stScript(element, env, children) {
            var scriptPath = '/mypapp/static/scripts/' + element.@src;
            return &amp;lt;script type=&quot;text/javascript&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
                src={scriptPath}&amp;gt; &amp;lt;/script&amp;gt;;
        }
    };
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Please note&lt;/strong&gt;: the above will make designers unable to work on templates independently of the application.&lt;/p&gt;</body>
  <created-at type="datetime">2008-09-21T04:15:13-07:00</created-at>
  <id type="integer">58538</id>
  <permalink>extension-library</permalink>
  <repository-id type="integer">53615</repository-id>
  <title>Extension Library</title>
  <updated-at type="datetime">2008-09-21T04:48:21-07:00</updated-at>
  <user-id type="integer">19322</user-id>
</wiki>
