Jump to content

Question about hooks


Recommended Posts

If I use

public function hookHeader( $params ){

echo "<script>alert('hi');</script>";

}

then in view source i view,

<script>alert('hi');</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

it means it's called even before html tag itself. this happens with top also. but in prestashop docs,

http://doc.prestashop.com/display/PS14/Creating+a+PrestaShop+module

it's written at different place. header header.php No Called between the HEAD tags. Ideal location for adding JavaScript and CSS files. top header.php Yes

Called in the page's header.

Link to comment
Share on other sites

×
×
  • Create New...