Show Member Chunk - MODX

ShowMemberChunk is a super-lightweight MODX snippet that allows you to customize content based upon whether or not someone is a member of a website group. It is designed to be easy to use and implement and can be up and running in minutes. It works in MODX Revolution versions 2.2.7 and above. It has not been tested for earlier versions.

Usage

Download and install the package through the Package Manager. DOWNLOAD HERE »

Chunks Needed

Where you would like to show alternate content for members logged into the site create two chunks: one for members and one for non-members. You can leave the “out” chunk blank if you would prefer to not show anything for non-members.

Member view

Example usage: Non-members see an advertisement asking them to join the organization; members see a menu with member-only content.

Non-Member view

Member Check

In your snippet call you must tell the snippet which member groups to look for. For instance, if you have a site where there are Premium members and Basic members and want to show the chunk to all members of each group use a comma separated list for the member groups as in the example below:

Member view home page

[[!showChunk? &group=`Administrator,Activist Members,Premium Members`
&in_chunk=`privateSiteNav` &out_chunk=`membershipPromote`]]

&group is showing this member groups for the site - there are Administrators, Members, Activist and Premium Members listed in the example above.

&in_chunk shows the “privateSiteNav” chunk if they are logged in as one of the members above.

&out_chunk shows the “membershipPromote” chunk if they are not logged into the site or if they are not a member of one of the groups listed.

ShowMemberCheck can be used multiple times on any page of a website with various chunks. For instance, as a logged-in member you can access content for members only and you can view menus and promotions not available to others.

Limitations

In order to work properly within the chunks you will need to use a separate browser to view the front-end of the site and the manager. (When logged into the manager you are effectively always logged into the site.)

Download the Package

If you choose to download from here you must manually upload to to your server in the core .. packages folder. Note: if you are on a Mac / Safari go into preferences and disable "Open "safe" files after downloading" in the general tab. Download »

CLIENT TESTIMONIALS

I have worked with Jack for 5 years now. He has always been nothing but professional. The artistic designs that he has created for us have been unbelievably magnificent. He is the first guy I recommend to anyone looking for web development. Awesome, awesome work Jack.
Jim Piper, Jr., Lead Today Society

Jack is brilliant ! He has created an amazing website for our studio. We receive daily comments from our students that they love our website and came to see the studio initially because of the website. I would highly recommend!
Elizabeth M., iThrive Yoga

It was clear that he spent time researching my field and similar websites. He was accommodating and listened to what I needed and delivered an exceptional website. Everything was completed in the time we agreed upon and he made adjustments as needed. I absolutely love my new website!
Jill K., My Coding Mentor

TELL US ABOUT YOUR PROJECT

Copyright © 2005 – 2018 Impress Design