Files
smarty/docs/en/programmers/api-variables/variable-plugins-dir.xml

80 lines
2.3 KiB
XML
Raw Normal View History

2004-04-13 11:47:32 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="variable.plugins.dir">
<title>$plugins_dir</title>
<para>
2006-09-27 06:28:21 +00:00
This is the directory or directories where Smarty will look for the
plugins that it needs. Default is
2006-09-27 06:28:21 +00:00
<filename class="directory">plugins/</filename> under the
<link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>.
If you supply a relative path, Smarty will first look under the
<link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>, then
relative to the current working directory, then relative to the PHP
include_path. If <parameter>$plugins_dir</parameter>
is an array of directories, Smarty will
search for your plugin in each plugin directory
<emphasis role="bold">in the order they are given</emphasis>.
2004-04-13 11:47:32 +00:00
</para>
<note>
<title>Technical Note</title>
<para>
2006-09-27 06:28:21 +00:00
For best performance, do not setup your <parameter>$plugins_dir</parameter>
to have to use the PHP include path. Use an absolute pathname,
or a path relative to <constant>SMARTY_DIR</constant> or the current
working directory.
</para>
</note>
2005-09-13 17:18:59 +00:00
<example>
2005-09-13 17:56:19 +00:00
<title>Appending a local plugin dir</title>
2005-09-13 17:18:59 +00:00
<programlisting role="php">
<![CDATA[
<?php
$smarty->plugins_dir[] = 'includes/my_smarty_plugins';
?>
]]>
</programlisting>
</example>
<example>
2006-09-27 06:28:21 +00:00
<title>Multiple $plugins_dir</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->plugins_dir = array(
'plugins', // the default under SMARTY_DIR
'/path/to/shared/plugins',
'../../includes/my/plugins'
);
?>
]]>
</programlisting>
</example>
2004-04-13 11:47:32 +00:00
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->