If you have been using Joomla! for whileyou have probably already encountered the need to hide some content when users are logged in.

Let's say for example, you want users to be able to download files only if they have registered and logged in - and you want to display a specific "Register and Login" message only if users are logged out of the website.

Or you want to load adverts if users are guests and have not subscribed and logged in to your website.

Contents[Show]

From our experience, there doesn't seem to be many ways to do this.

We encountered this need here on this website, where we want to ask users to register to download files, but once they are logged in, then that message should no longer be visible. It is fairly easy to do this by tweaking some Joomla! code, but this will break the upgradability of your website. So we took the changes and packaged them into this module - the Load Public Position Joomla! Plugin

The plugin provided here allows you to define a module position which you want to load WITHIN your content only when users are logged in.

Usage

Create a module position which you want to hide when logged in via the Module Manager e.g. advertnotlogged, publish it on the pages you want to show, then insert {loadpositionpublic advertnotlogged} into the content where you want the content to show when users are logged out.

Remember to enable the plugin before trying to use it.

Download - No longer available

Joomla 2.5 and Joomla 3.0

Demo

Try logging into this website and the following message will be gone.

Compatibility

The plugin is compatible with Joomla 2.5 and 3.x

Check out the following video:

D_sD3_cK3-0

 

About the Author
David Attard
Author: David AttardWebsite: https://www.linkedin.com/in/dattard/
David has been working in or around the online / digital industry for the last 18 years. He has vast experience in the software and web design industries using WordPress, Joomla and niches surrounding them. As a digital consultant, his focus is on helping businesses get a competitive advantage using a combination of their website and digital platforms available today.

One more thing... Did you know that people who share useful stuff like this post look AWESOME too? ;-)
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!

Disclosure: This page may contain links to external sites for products which we love and wholeheartedly recommend. If you buy products we suggest, we may earn a referral fee. Such fees do not influence our recommendations and we do not accept payments for positive reviews.

Featured On

Inc Magazine Logo  

Sitepoint logo  

CSS Tricks logo   

webdesignerdepot logo   WPMU DEV logo   

and many more!

 

 

Get Started Now With ShutterstockShutterstock

Best Rated Caching Plugin

Make your website faster 

How to make your website FAST!

Step-by-step - free email course, how to make your website load in less than 1 second  

who are we?

CollectiveRay is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run DronesBuy.net - a website for drone hobbyists.

David attard