|
|
#11 |
|
Coder
Join Date: Mar 2006
Posts: 4,490
Rep Power: 109 ![]() ![]() |
Smarty has its own program like functions, what I did above is smarty code not PHP. For php the "if" would be outside the braces and they wouldnt be curly brackets either.
To use php inside of a template you need to escape the code so the smarty compiler doesnt try to treat it as smarty or html. To do this you simply surround your php with tags like so... {php} {/php} |
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Apr 2007
Posts: 6
Rep Power: 0 ![]() |
Excellent, many thanks for the help.
|
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Sep 2007
Posts: 23
Rep Power: 8 ![]() |
Is there anyway to pass variables to the smarty functions?
I have the category id, and would like to pass it a new function I have made, so I can show the links with this category id as it's parent. |
|
|
|
|
|
#14 |
|
Junior Member
Join Date: Sep 2007
Posts: 23
Rep Power: 8 ![]() |
It's ok - I have found it!
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|