<!--
/**
* @package documentation
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: read_me_jscript.html 3273 2006-03-27 16:48:29Z drbyte $
*/
//-->
<!--
body, table{ font-family:Verdana, Arial, Helvetica, sans-serif; font-size:14px; }
table.intro {border-color:C96E29; }
td.intro{background-color:#EEEEEE ; border-color:5778ce; font-size:14px; }
td.plainbox, div.callout {border: 1px dashed; border-color: C96E29; margin:5 40 5 40;}
.heading {background-color:5778CE; font-weight:bold; font-size:14px; width: 100%; }
.title1 {color:C96E29; font-weight:bold; font-size:22px; }
.title2 {color:C96E29; font-weight:bold; font-size:13px; }
.small {font-size:10px ;}
.error {color:FF0000; }
.filename {font-family: mono, "Courier New", Courier ; font-size:14px; color: c96e29;}
.pseudolink {text-decoration:underline; color:5778CE;}
h1.intro { color: #ffffff; border:1px solid #aca893; background-color: #c96e29; font-size: 22px; padding: 4px;}
h1 { color: #ffffff; border:1px solid #aca893; background-color: #5778ce; font-size: 20px; padding: 4px;}
h2 { color: #c96e29; font-size: 18px;}
h3 { color: #5778ce; font-size: 16px; margin-bottom:0px;}
h4 { color: #c96e29; font-size: 14px;}
.style1 {color: #CC0000}
.style2 {color: #0033FF}
-->
<h2>Site-Wide jscript's
</h2>
<h3>jscript*.js files -- to be
"linked
" by your site
</h3>
<p>Any file in the
<code class="filename">includes/templates/
<span class="style2">{template_directory}
</span>/jscript/
</code> directory with the following filename format will be loaded globally on every page of your shop:
<br />
<em>(where
<span class="style1">{unique_name}
</span> can be anything you want)
</em><br />
Effectively, the file will be loaded as if you had inserted the following into an HTML page:
<br />
<code class="filename"><script language=
"javascript
" src=
"includes/templates/
<span class="style2">{template_directory}
</span>/jscript/jscript_
<span class="style1">{unique_name}
</span>.js
"></script
></code><br />
<h3>jscript*.php files -- to be
"included
" in your HTML content sent to the browser, inline.
</h3>
<p>If you need to control the content of certain PHP variables inside jscript code on the page, OR if you need to include several
<script
>...
</script
> tags, use a jscript_*.
<strong>php
</strong> file instead.
<br />
However,
<span class="style1">in this case,
<strong>you DO need to include
</strong></span> the
<span class="filename"><script ....
></span> and
<span class="filename"></script
></span> tags in the file.
</p>
<h2>Page-Specific jscript's
</h2>
<p>For page-specific operation, put the file under the
<code class="filename">/includes/modules/pages/{pagename}/
</code> folder.
</p>
<h3>jscript*.js files -- to be
"linked
" by your site
</h3>
<p>NOTE:
<span class="style1">jscript_*.js
</span> files must
<strong>not
</strong> contain any
<code class="filename"><script...
> ....
</script
></code> tags.
<span class="style1">They should contain ONLY the contents that are to go
"between
" those tags.
<br />
<h3>jscript*.php files -- to be
"included
" in your HTML content sent to the browser, inline.
</h3>
<p>If you need to control the content of certain PHP variables inside jscript code on the page, use a jscript_*.
<strong>php
</strong> file.
<br />
However,
<span class="style1">in this case, you
<strong>DO need to include
</strong></span> the
<span class="filename"><script ....
></span> and
<span class="filename"></script
></span> tags in the file.
</p>