On a webpage with .html
extension, you can not use the php
tags right?
But I saw in some pages html
codes of type {CONTEUDO}
which displays a text defined in a file php
'$tpl->CONTEUDO = "texto"
'.
But I do not exactly understand the use of these { }
tags to show something of php
, can you show a variable or a constant in this way?
Code php:
require("banco.php");
require("classes/funcoes.php");
require("classes/String.php");
require("classes/Template.class.php");
$tpl = new Template("html/template.html");
//-- Google ****
$tpl->PG_TITLE = "Rações Catarinense";
$tpl->PG_DESCRIPTION = "Rações Catarinense ";
$tpl->PG_KEYWORDS = "Rações Catarinense ";
$tpl->PG_CANONICAL = "http://www." . $_SERVER['SERVER_NAME'] . "/";
//-- Google ****
// Adicionando mais um arquivo HTML
$tpl->addFile("CONTEUDO", "html/produto.html");
$tpl->CSS = "produto";
$tpl->ATIVO_home = 'class="ativo"';
$tpl->PAGINA_ATIVA = "produto-body";
On the product.html page these attributes are displayed as '{PAGINA_ATIVA}'