Display k2 item with "registered" access level in category view

  • Mars Cureg
  • Mars Cureg's Avatar Topic Author
  • Offline
  • New Member
3 weeks 4 days ago #178939 by Mars Cureg

I have been using K2 to display some article items with "registered" access level in category view, then when a user open the article, it will ask the user to login. It was working before (Version 2.7.1).

Then yesterday, I updated my K2 to ( Version 2.10.3) not all articles that are restricted to "registered" users is no longer showing in category view.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
3 weeks 3 days ago - 3 weeks 3 days ago #178961 by Fotis
K2 never supported this feature by default (allow introtext to be public then require a login to see the actual item). But it's easily done in K2 template overrides. Since v2.7.1 is really old, it's most likely that you had modified (you or someone else) core files of K2 in the past, adding that functionality (which again is dead simple to add in a K2 sub-template).

First of all, consult this guide to make a copy of K2's template overrides inside your template's /html folder.

Once you copy the files in /templates/YOUR_TEMPLATE/html/com_k2/ you should have a "default" folder in there. Duplicate that folder to the name "restricted". Then open up the file /templates/YOUR_TEMPLATE/html/com_k2/restricted/item.php and replace its contents with this:
If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory:

IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member
Last edit: 3 weeks 3 days ago by Fotis.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum