Skip to content
Narrow screen resolution Wide screen resolution Auto adjust screen size Increase font size Decrease font size Default font size

dioscouri.com

Home arrow JUGA arrow HowTo arrow Make Content Appear Different for each JUGA group
Make Content Appear Different for each JUGA group
Let's take this example:  If you want:

   1. Three separate kinds of users (Group1, Group2, Group3)
   2. Group1 to see Homepage1, Group2 to see Homepage2, and Group3 to see Homepage3

JUGA cannot redirect a user after login to a particular page, but if you ** USE THE JUGAACCESS CONTENT PLUGIN! ** you can create a *single* frontpage that will appear different for each user.  Here's how:

Create a content item that will serve as your frontpage.

Then, inside that content item, use the jugaaccess plugin as follows:

    remove the space after the { for the code to work 

    { jugaaccess Group1, !Group2, !Group3} This content is only for Group1{/jugaaccess}
    { jugaaccess !Group1, Group2, !Group3} This content is only for Group2{/jugaaccess}
    { jugaaccess !Group1, !Group2, Group3} This content is only for Group3{/jugaaccess}


Then, when a user accesses your frontpage, depending on their JUGA group, they'd only be able to see one of those three sections, making their frontpage unique!

Do you want to do what's written above but using existing content articles rather than merging all the content into one article?  Use a content embedding plugin/mambot!  D4J has a great one available for Joomla! 1.0.x. 
EMBED
If you use Joomla! 1.5.x, you can use EMBED to perform the same thing! You would only have to replace`contentembedding` with `embed` in the examples on this page.
 
Using the plugin/mambot, your code would look like this:

    remove the space after the { for the code to work


    { jugaaccess Group1} { contentembedding where=content&where_id=1} {/jugaaccess}
    { jugaaccess Group2} { contentembedding where=content&where_id=2} {/jugaaccess}
    { jugaaccess Group3} { contentembedding where=content&where_id=3} {/jugaaccess}

 The "where_id" correlates to the content item's ID#.  


NOTE!  These plugins allow you to display an entire content category, so if you want to display a whole category only to a specific JUGA group, use this code:

    {jugaaccess Group1}  { contentembedding where=category&where_id=1&ordering=order} {/jugaaccess}
    {jugaaccess Group2}  { contentembedding where=category&where_id=2&ordering=order} {/jugaaccess}
    {jugaaccess Group3}  { contentembedding where=category&where_id=3&ordering=order} {/jugaaccess}


Great, no?  Thanks!

 
Skilled in PHP and Joomla!? Like working from home? Want to join our team? If freedom and creativity appeal to you, contact us in our Support Center!

Login Menu