2013-09-16 5 views
0

В чем смысл всего тэга {# ... #} в коде ниже?В чем смысл тега "{# ... #}" в файле tpl?

{include file="header.tpl" title="install" showheader="no"} 

<div class="install" style="text-align:center;padding:5% 0 0 0;"> 
    <div style="text-align:left;width:500px;margin:0 auto;padding:25px 25px 15px 25px;background:white;border:1px solid;"> 

     <h1>{#installcollabtive#}</h1> 

     <div style="padding:16px 0 16px 0;"> 
      <h2>{#installstep#} 3</h2> 
      <em>{#createadmin#}</em><br /><br /> 

      <form class = "main" name = "adminuser" method = "post" enctype="multipart/form-data" action = "install.php?action=step3"> 
       <fieldset> 
        <div class = "row"><label for = "username">{#name#}:</label><input type = "text" name = "name" id = "username" /></div> 
        <div class = "row"><label for = "pass">{#password#}:</label><input type = "password" name = "pass" id = "pass" /></div> 
       </fieldset> 
       <br /> 
        <div class="row-butn-bottom"> 
         <label>&nbsp;</label> 
         <button type="submit" onfocus="this.blur();">{#continue#}</button> 
        </div> 
       </fieldset> 
      </form> 

       </div> 
      </div> 
     </div> {*Install end*} 
    </body> 
</html> 

Любая помощь будет принята с благодарностью, большое вам спасибо!

+0

вы используете OpenCart? –

+0

нет, я использую collabtive (программное обеспечение для управления проектами) –

ответ

1

Переменные, загружаемые из конфигурационных файлов, ссылаются на них в пределах #hash marks# или с переменной smarty $smarty.config. Более поздний синтаксис полезен для вложения в значения кавычек.

Пример файла конфигурации:

pageTitle = "This is mine" 
bodyBgColor = '#eeeeee' 
tableBorderSize = 3 
tableBgColor = "#bbbbbb" 
rowBgColor = "#cccccc" 

Шаблон демонстрирует #hash# метод:

{config_load file='foo.conf'} 
<html> 
<title>{#pageTitle#}</title> 
<body bgcolor="{#bodyBgColor#}"> 
<table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}"> 
<tr bgcolor="{#rowBgColor#}"> 
    <td>First</td> 
    <td>Last</td> 
    <td>Address</td> 
</tr> 
</table> 
</body> 
</html> 

Шаблон демонстрирующего $smarty.config метод:

{config_load file='foo.conf'} 
<html> 
<title>{$smarty.config.pageTitle}</title> 
<body bgcolor="{$smarty.config.bodyBgColor}"> 
<table border="{$smarty.config.tableBorderSize}" bgcolor="{$smarty.config.tableBgColor}"> 
<tr bgcolor="{$smarty.config.rowBgColor}"> 
    <td>First</td> 
    <td>Last</td> 
    <td>Address</td> 
</tr> 
</table> 
</body> 
</html> 
+0

Спасибо, я понял. В моем случае это ссылка на конфигурацию языка. –

Смежные вопросы