Skip to main content
replaced http://craftcms.stackexchange.com/ with https://craftcms.stackexchange.com/
Source Link

When you mention new user group, is that a new group of admins/back end users or just people browsing on the front end?

If it's on the front end, just checking the logged in user's group in twig against a new restricted entry type could give you want you want.

{% if entry.type == "restrictedEntryType" and currentUser and currentUser.isInGroup('newUserGroup') %}

   {# let them through #}
   {% include "whatever/restricted_content.html" %}

{% else %}
   <p>Thou shall not pass! You need to log in to see this content.</p>
{%endif%}

If it's the back end, like you said, you'd have to do a serious refactor to manage it properly. Put all the restricted content in one structure and only give access to admins/users you want to have edit the content. You may end up doing that anyway just to keep everything sane, depending on how siphoned off your content is.

To move a structure from one section to another, check out Brandon Kelly's canonical answerBrandon Kelly's canonical answer.

When you mention new user group, is that a new group of admins/back end users or just people browsing on the front end?

If it's on the front end, just checking the logged in user's group in twig against a new restricted entry type could give you want you want.

{% if entry.type == "restrictedEntryType" and currentUser and currentUser.isInGroup('newUserGroup') %}

   {# let them through #}
   {% include "whatever/restricted_content.html" %}

{% else %}
   <p>Thou shall not pass! You need to log in to see this content.</p>
{%endif%}

If it's the back end, like you said, you'd have to do a serious refactor to manage it properly. Put all the restricted content in one structure and only give access to admins/users you want to have edit the content. You may end up doing that anyway just to keep everything sane, depending on how siphoned off your content is.

To move a structure from one section to another, check out Brandon Kelly's canonical answer.

When you mention new user group, is that a new group of admins/back end users or just people browsing on the front end?

If it's on the front end, just checking the logged in user's group in twig against a new restricted entry type could give you want you want.

{% if entry.type == "restrictedEntryType" and currentUser and currentUser.isInGroup('newUserGroup') %}

   {# let them through #}
   {% include "whatever/restricted_content.html" %}

{% else %}
   <p>Thou shall not pass! You need to log in to see this content.</p>
{%endif%}

If it's the back end, like you said, you'd have to do a serious refactor to manage it properly. Put all the restricted content in one structure and only give access to admins/users you want to have edit the content. You may end up doing that anyway just to keep everything sane, depending on how siphoned off your content is.

To move a structure from one section to another, check out Brandon Kelly's canonical answer.

Source Link
RitterKnight
  • 6.6k
  • 15
  • 24

When you mention new user group, is that a new group of admins/back end users or just people browsing on the front end?

If it's on the front end, just checking the logged in user's group in twig against a new restricted entry type could give you want you want.

{% if entry.type == "restrictedEntryType" and currentUser and currentUser.isInGroup('newUserGroup') %}

   {# let them through #}
   {% include "whatever/restricted_content.html" %}

{% else %}
   <p>Thou shall not pass! You need to log in to see this content.</p>
{%endif%}

If it's the back end, like you said, you'd have to do a serious refactor to manage it properly. Put all the restricted content in one structure and only give access to admins/users you want to have edit the content. You may end up doing that anyway just to keep everything sane, depending on how siphoned off your content is.

To move a structure from one section to another, check out Brandon Kelly's canonical answer.