Forums Index > Mewsoft Products > Classifiedawy > Conditional Display
hayakawa First Post Posted on: 03-13-11 09:54 AM
Conditional Display

Hello friends,\ \ I want to insert a Logout link to the welcome_area but it will be only shown to logged-in users, not visitors. \ \ After you click on account manager you see links on the left cloumn. I want to make that left column visible to only logged-in users, not visitors.\ \ What should be the code? \ I hope these changes go into the release because these are very important from usability point of view. (http://www.useit.com)
mewsoft Reply #: 1 Posted on: 03-13-11 10:30 AM
Re: Conditional Display

This is easy. Insert the logout link in the language variable:

welcome_current_user

In the language file :

General.pm

From your admin -> Language Manager -> Edit Language.

Basically you have 2 different messages, one for none logged in users or visitors and one for logged in users.


Code: HTML
</p><p>welcome_new_user~==~Welcome Visitor, Please &lt;a href=&quot;&lt;!--CLASS::Account_Manager--&gt;&quot;&gt;Login&lt;/a&gt; or &lt;A HREF=&quot;&lt;!--CLASS::Sign_Up--&gt;&quot;&gt;Register&lt;/a&gt; Now</p><p><br />welcome_current_user~==~Welcome &lt;A HREF=&quot;&lt;!--CLASS::Account_Manager--&gt;&quot;&gt;&lt;!--User_ID--&gt;&lt;/a&gt;<br /></p><p>


Mewsoft Support
www.mewsoft.com

mewsoft Reply #: 2 Posted on: 03-13-11 10:42 AM
Conditional Display

 
hayakawa's Wrote:
 I want to make that left column visible to only logged-in users, not visitors. What should be the code? I hope these changes go into the release because these are very important from usability point of view.

This is also easy. The template AccountMgr.html is the main layout for all the account manager functions. So to do what you want and make each template different look for the account manager including the login you will have to do this:

1)- Copy the links section from the template AccountMgr.html  to all the account manager templates and customize these templates for that.

2)- Clear the account manager navigation links or remove anything you do not want to display to none logged in users in the file AccountMgr.html .

Thanks.


Mewsoft Support
www.mewsoft.com

hayakawa Reply #: 3 Posted on: 03-14-11 02:50 AM
Re: Conditional Display

You didn't get my point. I'm asking conditional display of some HTML code:\ \ first\ IF user is logged-in THEN show log-out link ELSE do not show anything.\ \ second\ IF user is NOT logged-in THEN do not show left column in the account manager login page.\ \ \ My original reply has been deleted???
hayakawa Reply #: 4 Posted on: 03-22-11 03:24 AM
Re: Conditional Display

Currently, account manager login form is called from AccountMgr.html. If I can make the login form as a complete standalone template I can remove the left menu. and after log-in it should redirect to account manager overview page, of course. Can you tell me how can do this?