Vheissu / Ci-Smarty

Smarty templating engine integration for Codeigniter 3.0+ with inbuilt theming and asset management.
http://ilikekillnerds.com
179 stars 43 forks source link

Parser does not work with every $config['base_url'] format. #9

Closed Vanitas closed 13 years ago

Vanitas commented 13 years ago

Hi, I've just noticed a strange thing. When base_url in config file is set to: $config['base_url'] = 'localhost';

Parser works fine for me but when I renamed this value to: $config['base_url'] = 'http://localhost'/; //as it should be

all I got was a blank page (funny thing, page source was ok). This is my sample template file:

{$template_type = 'frontend'}
{$articleTitle|default:'no title'}
<html>
<head>
    <title>{$title}</title>
    {$css}
    {$js}
</head>
<body>
    {$body}<br>
    {lang line="test"}<br>
    {$themeurl}<br>
    <img src="{$themeurl}images/shared/content_repeat.jpg">
</body>
</html>

You can see some test variables.

Lets look at {$articleTitle|default:'no title'}

When cache dir is empty and I load the page in browser 'no title' appears for a short moment then it disappears (but page source is still ok) Also I can copy page content with Ctrl+A, Ctrl+C like every normal page.

In desperation I set chmod 777 to whole htdocs/ folder but still nothing.

Vanitas commented 13 years ago

I changed template file to proper XHTML template and works fine. I tried to figure out if it's matter of DOCTYPE or meta declarations but I couldn't find nothing.