Where is a description of them all???
Or I have to guess how it works???
And there is more interesting that I can not use these variables through a simple php code.
[{php}]
print_r(‘Hello world’); //returns ‘Hello world’.
print_r($rsslinks); //returns nothing.
[{/php}]
And also I can not understand: why they use ‘smarty’?
Simple PHP is much more easier.
If you see drupal templates of a some theme (.tpl.php), there is no template engine used, and it works great and it is easy to change them.
Smarty-Plugins (function):
[{smartyPlugin}]
eg:
[B][{debug}][/B] -->shows all current smarty-variables in a popup
PHP-Functions:
like Plugins with leading @ in function name. You need everytime a parameter.
[{‘param1’|@phpFunction}]
Eg:
[{$rsslinks|@print_r}]
or (i think it was)
[{php}]
print_r($this->_tpl_vars->rsslinks);
[{/php}]
… maybe $smarty instead of $this?
Chaining of functons in smarty:
[{‘value’|@function1|@function2}]
php:
function2(function1(‘value’))… i think
I never can see what will happen - everytime try and error - and brackets (…) dont work (well).
Arrays:
sometimes you can use
[{$aArray[vector]}]
sometimes this
[{$aArray.vector}]
Yes, smarty is a %$/$%.
Why they use something like a own lexer/parser, if the original language works and is well documentated?
The only nice things are:
caching and manipulating pre-compiled templates… i guess every template engine can do it.
iterators (foreach) -> i can do it self… if i need.
And your first question: I’m afraid there is no description of all the functions, but you can look in view sourcecode. There are some Variables that are always passed to smarty (by oxview::addGlobalParams) including $oView (current view class) and $oViewConf (some additional data).
You can look for the methods of $oView in the view class itself (e.g. details.php), or its parents oxview and oxubase. The methods of $oViewConf are in class oxviewconfig.
You can use the methods you find there in smarty, or extend the view class to place your own methods there.