Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Is there an example web application that uses partial views with access control (security plugin)

Few screens from my application has sections that needs to be shown to a certain group of users only, i am looking for an example application (like invo) that demonstrates how to build views composed of many small partial view fragments. thanks in advance.



30.0k
Accepted
answer
edited Jan '16

Hi,

Depending on how you set authorization, but it can be as simple as:

  {% if session.auth == "registred" %}

    {{ partial("user/userMenu") }}

  {% endif %}