Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
{include} smarty tag?
clethrill
✭✭
Best Answer
-
x00 MVPyou can use {asset} or create your own smarty function/plugin.
look in library/vendors/
Personally I have come to the conclusion that smarty is a bit of waste of time though.
If you are using {include} and {php} and all sort of logic in there you aren't getting separation of concerns, which is the whole point of a template engine.grep is your friend.
1
Answers
look in library/vendors/
Personally I have come to the conclusion that smarty is a bit of waste of time though.
If you are using {include} and {php} and all sort of logic in there you aren't getting separation of concerns, which is the whole point of a template engine.
grep is your friend.
I attempted to convert it to php but I was a bit sloppy and had errors everywhere and gave up in the end. I will look into the asset tag.
**> Personally I have come to the conclusion that smarty is a bit of waste of time though. **
It's wasting all of my time today. Do you know of a list containing PHP equivalents of the Vanilla Smarty tags. The documentation would be a logical place to look. Alas...
I know a fair bit, but it is fair to say that the smarty implementation abstract a lot of to the logic in smarty functions (but in a more limited, less pliable way). So really the equivalent you are looking for aren't really 1:1
Best thing to do is to interpret the php version of the default template. and also you can look at how the smarty functions where constructed in /library/vendors/SmartyPlugins.
I can't really say more that that, because it can be be time consuming explaining everything, when people doing really care how it works. Really you a re better off learning that because that little bit of knowledge, will save you time in the long run.
grep is your friend.