I cannot assign my own PHP function. (I just have access to the TPL file).
So far I got {$smarty.server.PHP_SELF}, which returns something like /foo/bar.xin. With built in functions, I’d like to get /foo/.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As I noted,
{php}tags are deprecated, but you can do the following:I haven’t been able to test this, since I don’t have a parser at my disposal, but it follows the example on the Smarty documentation page:
http://www.smarty.net/docs/en/language.function.php.tpl