We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Add-Ons
default app icon

GB Gated Content

By Gilbert Lin
Membership

Description

Set viewing conditions for your entries and/or create password protected content with ease.

GB Gated Content

Running a subscription website? Or simply want to reserve some content for certain groups of users with particular roles assigned? GB Gated Content lets you control who gets to view the entries with a custom entries loop and/or a flexible field type for you to specify the access condition and/or passcode.

GB Gated Content Example

GB Gated Content List of Keys

Example: custom entries loop

{exp:gb_gated_content:entries channel="blog" check="{logged_in_primary_role_id}" match="5|6" passcode="n0tAs@f3Pa$SvvOrD" limit="5"}
    <h2>{title}</h2>
    <p>{body}</p>
    {gb_gated_content_preview}
        <p>This content is for subscribers only. Please <a href="/signup">sign up here</a> and start learning how to code like a pro!</p>
        <p>If you have the access key, enter below to start reading.</p>
        {gb_gated_content_preview:form form:id="unlockForm" passcode:class="form-control" submit:class="btn btn-submit" submit:text="Unlock Content" fail_url="/test/gated_content_entries?unlock=failed"}
    {/gb_gated_content_preview}
{/exp:gb_gated_content:entries}

Example: field type usage

{exp:channel:entries channel="blog" limit="1"}
    {if my_gb_gated_content_field:unlocked}
        <h2>{title}</h2>
        <p>{body}</p>
        <hr>
    {if:else}
        <div class="preview">
            {my_gb_gated_content_field:preview}
        </div>
        {my_gb_gated_content_field:form form:id="myForm" passcode:class="form-control" submit:class="btn btn-submit" submit:text="Unlock Content"}
    {/if}
{/exp:channel:entries}
Information
Version 1.0.2
Last Update 3 years ago
Compatibility EE 6
License Commercial
Links
  • Documentation
  • Support
ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.