5

I want to have a public and private (logged in users) section on the front-end. Is that possible on craft?

Reah
  • 51
  • 2

1 Answers1

8

Yes. You need to build a frontend login form and then block non logged in users from seeing the entries with something along the lines of this:

{% if craft.session.isLoggedIn %}
    {# put content here #}
{% endif %}

You can also check if the user belongs to a specific group with isInGroup('groupHandle') (more here)

megatrond
  • 1,342
  • 6
  • 15