Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Check For Null Value in Template File #1

Open
KFKMan opened this issue Dec 10, 2023 · 1 comment
Open

Check For Null Value in Template File #1

KFKMan opened this issue Dec 10, 2023 · 1 comment

Comments

@KFKMan
Copy link

KFKMan commented Dec 10, 2023

How can i check value is null on template file

Like; if(isset($TAG_DATA))

@KFKMan
Copy link
Author

KFKMan commented Dec 10, 2023

i solved that but when i trying to render file i see empty screen but i'm trying to include compiled file manual it's can be seen.

No any error/warning on console/web page/service.

error_reporting(E_ALL);
ini_set('display_errors', 1);

$this->Engine = new Template(__DIR__.DIRECTORY_SEPARATOR."tpl".DIRECTORY_SEPARATOR, __DIR__.DIRECTORY_SEPARATOR.'compiled'.DIRECTORY_SEPARATOR);
$this->Engine->flushCompiled();
$TemplateVariables = array();
$this->Engine->render($PageTemplate,$TemplateVariables);
#foreach(get_included_files() as $incfile){echo $incfile.PHP_EOL."<br>";}
#include(__DIR__.DIRECTORY_SEPARATOR."compiled".DIRECTORY_SEPARATOR.$PageTemplate.".compiled");

Template File;

Hi

Compiled File;

Hi

On Include Files List, Look Like it's included.

C:\Users\oyunm\Desktop\template_sys\template-engine.php
C:\Users\oyunm\Desktop\template_sys\vendor\autoload.php
C:\Users\oyunm\Desktop\template_sys\vendor\composer\autoload_real.php
C:\Users\oyunm\Desktop\template_sys\vendor\composer\platform_check.php
C:\Users\oyunm\Desktop\template_sys\vendor\composer\ClassLoader.php
C:\Users\oyunm\Desktop\template_sys\vendor\composer\autoload_static.php
C:\Users\oyunm\Desktop\template_sys\sitemap-generator.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\Template.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\TemplateInterface.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\Compiler\Path.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\Compiler\PathInterface.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\Compiler\Compiler.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\Compiler\CompilerInterface.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\Compiler\Parser\Rules.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\Compiler\Parser\AbstractRules.php
C:\Users\oyunm\Desktop\template_sys\vendor\tleckie\template\src\Compiler\Parser\RulesInterface.php
C:\Users\oyunm\Desktop\template_sys\compiled\template.html.compiled

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant