Details
-
Improvement
-
Resolution: Fixed
-
High
-
None
-
None
Description
In order to demo the "Premium Content" feature and make it easy for the editors, it's important to re-implement this feature (previously available in the DemoBundle - eZ Publish Platform)
This feature will be integrated on "Article" Content Type.
User flow
- As an anonymous user, I cannot see the full content
- As an anonymous user, I log in
(- As an anonymous user, I create an account (register feature) if I don't have an account) - As a member, I can read the premium content
Content Type update
- Remove field: Subscriber teaser (ezrichtext) (id: 185)
- Add field: Premium Content (checkbox, not checked by default, category content)
Content update
For the demo purposes, it will be useful to have one content item with the Premium Content activated.
I suggest that the article "Polish Cuisine" is only accessible to the members
Design
See attached document (Article_Premium_Content_1 Option Button.png)
Technical / Template
2 tests should be enough.
Suggestion:
{% if premium_content %} {% if user is logged in and belongs to Members user group %} Display full content {% else %} Display first part of the content {% endif %} {% else %} Display full content {% endif %}
Important: Be careful with the generated cache on the frontend!