impressed Posted May 29, 2012 Share Posted May 29, 2012 Thanks to below topic I can add HTML to te "Category Description" http://www.prestashop.com/forums/topic/91370-category-description-with-html-tags/ However I also, want to add some javascript to it as well. If I add it now I get an error. Somehow there there is a validation that does not allow javascript. Who knows how to turn it of? Purpose of javascript. Add fancybox of a "read more" link that works. Thanks Link to comment Share on other sites More sharing options...
codegrunt Posted May 29, 2012 Share Posted May 29, 2012 (edited) Instead of embedding Javascript in the category description itself, embed a div (or similar element) with a custom class and then add a Javascript function via $(document).ready(); that cycles through this class and sets up the fancybox elements for each category as needed. Cheers Edited May 29, 2012 by codegrunt (see edit history) Link to comment Share on other sites More sharing options...
impressed Posted May 30, 2012 Author Share Posted May 30, 2012 thanks for the suggestion, however I've found another sulotion that works as well. What I did. In ../classes/category.php I changed this line protected $fieldsValidateLang = array('name' => 'isCatalogName', 'link_rewrite' => 'isLinkRewrite', 'description' => 'isCleanHtml', into protected $fieldsValidateLang = array('name' => 'isCatalogName', 'link_rewrite' => 'isLinkRewrite', 'description' => 'isString', This way the category description allows to ad javascript. Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now