Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Patches for split_parser branch - fixed one bug in include tag and added include_path #118

Open
wants to merge 77 commits into
base: split_parser
Choose a base branch
from

Conversation

keskad
Copy link

@keskad keskad commented Sep 22, 2013

Hello.

RainTPL just stopped working with include tags. So I fixed the problem and added new option "include_path" that will allow searching for template to include in many diffirent paths. It will not slow down template engine as it's only doing once (when template is going to be compiled).

I will add also two configuration options "force_compile" and "dont_compile". The first one will be for debugging purposes (I have save a template file everytime I want to debug parser... it's annoying) and the second one will allow compiling templates from crontab.

@edit
Removed "force_compile" as there is already "debug" option that provides same feature.
Added "allow_compile" and "allow_compile_once" - with True values by default.

feulf and others added 25 commits August 2, 2013 16:39
Split of Parser from Tpl, to improve performances and maintainability
Removed echo for ternary operator. (third section)
Issue 95, removed redundant $conf['tags']
Remove duplicate php open/close tags, fixes #52
…r more advanced projects that uses more than one template directory
…pile_once", so the engine can be used for scheduled compilation using crontab
@prisis
Copy link

prisis commented Oct 24, 2013

how can i include a full path?

because if i use multi tpl_dir and dont have the same folders

something like that

Modul/Content/Tpl/content.html

and my base folder

Themes/public/desktop/test/index.html

i need content from folder A in index from folder B, when i use {include = "Content/Tpl/content"}
i get a error that TPL can find that template

@feulf
Copy link
Owner

feulf commented Oct 24, 2013

I'll work on this issue, thanks for reporting it.

On Thu, Oct 24, 2013 at 4:50 PM, prisis notifications@github.com wrote:

how can i include a full path?

because if i use multi tpl_dir and dont have the same folders

something like that

Modul/Content/Tpl/content.html

and my base folder

Themes/public/desktop/test/index.html

i need content from folder A in index from folder B, when i use {include =
"Content/Tpl/content"}
i get a error that TPL can find that template


Reply to this email directly or view it on GitHubhttps://github.com//pull/118#issuecomment-27028618
.

feulf and others added 30 commits November 28, 2013 14:36
Fix for issue-133 Compress Plugin
I had an error when I did the following:

```php
 $t = new Tpl;
 $t->assign('arraytest',array('this', 'is', 'a', 'test');
 $t->draw('test');
```

In the test template I tried to implode the array with a whitespace:
```html
{$arraytest|implode:" "}
```

But the result threw an error
```
Parse error: syntax error, unexpected ';'.......
```
 
Expected result:
```
this is a test
```

So I added and \s to the preg_match on line 610 of the Parser.php file.


Barry
added type 'form' to path replacement
Please add supporting path replacement for variables in templates.
path_replace run on after_filter instead of before_filter
modifierReplace : whitespace param error
add support for using static class functions as modifiers
Update with latest raintpl3Merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants