pikk
pikk

Reputation: 525

Joomla 2.5 custom html module for only public users

Using Joomla vers. 2.5 I have a Custom Html like that :

<table border="0" cellpadding="1" cellspacing="1" style="width: 100%; ">
    <tbody>
        <tr>
            <td>
                <form action="/login" id="form-login" method="post" name="form-login">
                     <input class="button" name="Submit" type="submit" value="Log In" />
                </form>
            </td>
        </tr>
    </tbody>
</table>

It's just a button linked to user login page. I want this button enabled (or visible) only for public users not with logged in ones. Or another custom code if user logged in to the site. Default login module is too big to show there.

Upvotes: 1

Views: 2762

Answers (2)

GeniusDesign
GeniusDesign

Reputation: 499

Just in case anyone still has problems figuring this one out, there is a very easy to follow guide on how to make it work with user groups here: http://docs.joomla.org/How_do_you_hide_something_from_logged_in_users%3F

Upvotes: 0

Craig
Craig

Reputation: 9330

In Joomla! 2.5 the default user groups/views and access levels simulate the old 1.5 style groups and are hierarchical as mentioned.

To make elements (modules, articles, menu items etc) visible only to users that aren't logged in you will need to create a "Guest" user group and set that as the default group that a new visitor is placed in. This "Guest" group will be outside the default hierarchy and means that you will have to set all items that you currently have as "Public" to "Guest".

There's a detailed description & how-to here in the Joomla! doc's website and a briefer article by Brian Teeman here.

Upvotes: 1

Related Questions