I just added filters which allow you to do this:
{{product.description | truncate: 100 | newlines_to_br | strip_newlines }}
http://wiki.shopify.com/FilterReference
1 other quick question on this subject, it’s working fine now apart from when I have an apostrophe in the description.
I’m using | escape
but it doesn’t escape. I line is encapsulated in apostrophes, so it causes the javascript not to work.
I have javascript tooltips that activate onMouseOver, so my code is essentially:
onMouseOver="Tip('{{product.description | strip_html | truncate: 250 | escape | newlines_to_br | strip_newlines}}');"
Subject | Author | Latest Post |
---|---|---|
Subject | Author | Posted |
---|---|---|
38m ago | ||
38m ago | ||
43m ago | ||
an hour ago | ||
an hour ago |
User | Count |
---|---|
323 | |
77 | |
72 | |
65 | |
56 |