How to replace the path of picture, CSS and JS in smarty-3.x template?
For example, the index.dwt template file contains a sentence code:
You may think that the picture can be displayed, but open the http://localhost/index.php, and find that the picture is not displayed, the path of the picture becomes http://localhost/images/ Logo.gif, and the real path should be http://localhost/themes/default/images/logo.gif. There are template files in the JS, CSS paths need to be replaced.
How do I replace the replacement function in the smarty-3.x version, and where is it written?
(smarty-2.x version I know, just don't know smarty-3.x version of the replacement)
I hope you guys help!
------Solution--------------------
Smarty-3.x still have this problem?
------Solution--------------------
Assign the path to the variable, and the direct write variable + file name in src:
PHP Code
Logo.gif "border=0/>
------Solution--------------------
Set a BasePath constant, change as needed
------Solution--------------------
The landlord should sleep.