Apply Jquery Effect to Block That's Included With a Theme
Permalink 1 user found helpfulWhat's the best way to go about doing this?
Does this method also work for adding a stylesheet? If so, what would be the markup for that?
My block works so far, except for when you go back to edit it, the text does not show. What would cause that?
$html = Loader::helper('html'); $this->addHeaderItem($html->css('mycssfile.css'));
both methods take $pkgHandle as a second argument so if you're packaging the block for marketplace the js/css file will be loaded from packages/yourpackage/css or js...
Can you be a bit more specific on the edit problem? Are you able to edit the block even though the text doesn't show? How are you outputting the contents in view.php?
will load the js file in root/js/myjsfile.js