How To: Display Description Excerpts Only
Sometimes, your clients will ask you to print out only a piece of the product descriptions they have entered. A typical situation is a front page which only shows a short introduction text about a product and a detailed product page which contains the full product description.
To make it easy for you and your client to accomplish this, we have implemented the following solution.
The client enters a product description as usual and clicks on the “add more break” button in the editor. This will insert a break that defines the end of the excerpt. That’s it.
The template designer now prints the product or page description as usual, but by using the excerpt filter:
{{ product.description|excerpt }}
This will only print the excerpt of the description (the part before the ‘more break’) instead of the full description, nice and easy. If you have any questions or remarks, please let us know in the comments section below.
Let's get social shall we?
We'd love to know what you think. Join the conversation about your hosted e-commerce solution.