开发者

Create mouse_over event with Smarty?

开发者 https://www.devze.com 2023-03-24 16:53 出处:网络
I have a site that is almost all PHP files which make calls to TPL files. On the front page called index.php, there are images which are displayed according to variables from the TPL/PHP开发者_JAVA百科

I have a site that is almost all PHP files which make calls to TPL files. On the front page called index.php, there are images which are displayed according to variables from the TPL/PHP开发者_JAVA百科 calls.

Usually I would just make onmouseclick do=etc, but there is no HTML anywhere, just TPL and PHP.

I want to create mouse_over events on the images on the main page. Is this possible without HTML?


Templates are html files (with some pseudo-programming language) - it doesn't matter if it has html or tpl extension.
Find your HTML code in that tpl files and if there is something missing, it will be probably in the php files.


there is no HTML anywhere, just TPL and PHP.

I want to create mouse_over events on the images on the main page. Is this possible without HTML?

Are you sure??? And what browser does display? Dosn't it HTML? Smarty (like any other template engine) is used only to sepate logic and view. All variable passed from PHP to Smarty (from *.php to *tpl) are rounded by HTML-code. You could use in Smarty any HTMl-code. It could be link(don't any link on your site?), paragraphs, spans, div(don't you have any text-structure on your site). You should use html to display content. And you could use javascript in your templates. It is not forbitten. Looks like you have missed something. http://www.google.com/search?hl=en&q=javascript+in+smarty+templates&oq=javascript+in+smarty+templates&aq=f&aqi=&aql=&gs_sm=e&gs_upl=11544l17461l0l17646l21l20l0l13l13l0l249l1210l1.3.3l7l0&biw=1272&bih=859&cad=h

0

精彩评论

暂无评论...
验证码 换一张
取 消