Skip to content

focuslabllc/assets_meta_members_only.ee_addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Assets Meta: Members Only

This extension is used directly with Pixel & Tonic’s Assets module. It adds a new meta field in the HUD to define if an asset is intended for members only or not.

Requirements

  • ExpressionEngine 2.1.3 or later
  • Assets 1.1 or later

Installation

  • Upload the assets_meta_members_only folder to system/expressionengine/third_party/
  • Enable Assets Meta: Members Only in Add-Ons → Extensions

Usage

Upon installation, each of your files’ HUDs will get a new “Members Only?” field. The options are simply “Yes|No” with respective values of “y|n”

You can filter your Assets fields to only show files which are or aren’t “members only” by adding members_only="y|n" to your opening Assets field tag. Note that simply setting an asset’s meta tag to “Yes” won’t hide the asset from your users. You will still need to additional logic to your templates for this.

This field value defaults to no.

Sample code:

Member Only Assets

{if logged_in}
  {my_assets_field members_only='y'}
    {filename}
  {/my_assets_field}
{/if}

Public Only Assets

{my_assets_field members_only='n'}
  {filename}
{/my_assets_field}

About

EE extension that adds a “Members Only?” field to Assets metadata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages