revv83 Posted October 27, 2015 Share Posted October 27, 2015 Hello. How can I change type of the FeatureValue to html. I did override to class FeatureValue.php and change validation to: 'validate' => 'isCleanHtml'. I tried isAnything too. Form is now correctly submitted (no errors), but html is still truncated.Where can I turn off removing html tags from this value? I want using <br> and <b> in feature value. Thanks. Link to comment Share on other sites More sharing options...
revv83 Posted October 28, 2015 Author Share Posted October 28, 2015 Yeah. It's working. I found great post here: https://www.prestashop.com/forums/topic/298061-how-to-add-hyperlink-and-images-to-features/In conclusion. To insert html tags to feature input, we need set 'type' => self::TYPE_NOTHING and 'validate' => 'isAnything' for value in lang fields in class FeatureValue.php.To view with html we need to modify product.tpl template and remove escaping 'htmlall' like that: {$feature.value|escape:'htmlall':'UTF-8'} 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