Topic-icon Show User Menu - how to make a same one as the demo

Active Subscriptions:

None
10 years 7 months ago #36202 by fei
I mentioned this in my another topic but I think it is worth to create a new topic specifically for this question so that others can search and read about it.

I just want to set my log out view to show user menu and make it same as the demo site 's My account, and it has drop down menu items lists including log out etc..
However, I am still got this strange layout, it is not drop down list and has some mess layout.

File Attachment:


Alex suggested to sclogin and bootstrap css files should be loaded correctly . I did it then and my current home page does have these two files loaded.
my home for testing: www.idream.com.au

but, the layout issues are still there.

I feel its layout was kind of my current template menu styles using its template css. I loaded mod_sclogin.css and sc_bootstrap.css at the end of all loadings?
how come it still not working and was affected by my template css? So confused now.
any help would be much appreciated!!
The topic has been locked.
Support Specialist
10 years 7 months ago #36213 by alzander
fei,
I just logged in on your site. The drop-down menu looks great and the logout menu item works as I'd expect. When clicked, I'm immediately logged out.

I'm assuming everything in your last post is now fixed (mainly from using the great instructions you provided in this post , but if you have any other questions regarding the posts above, just let me know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 7 months ago - 10 years 7 months ago #36223 by fei
thanks for that!

The User Menu logout view started to work, as long as I solved the JQeury and Bootstrap conflicts issue. (if any one wants to know it, pls refer to another topic --Jqeury and bootscrp conflict on this forum).

I still have some minor questions :

1)

File Attachment:


Why is my default style is button (my account)? I prefer to have text only like the demo sites. Anyway to change it or any reasons cause that button?

2)

File Attachment:


By default, my menu items under the user menu is horizontal. Why? Where can I change it to vertical if I want?
Also, I found its css style didn't use my whole site template style, e.g. the button color, it is blue now. in fact, everywhere else on my sits has red color button, not blue. I guess the blue are from SClogin css? any idea?

3) Do you know a direct log out url for joomlar 2.5 or later? ( i want it somewhere in my custom log out module)
Last edit: 10 years 7 months ago by fei.
The topic has been locked.
Support Specialist
10 years 7 months ago #36239 by alzander
1) Which 'demo sites' are you talking about? Do you mean this site, in the top right with "My Account" or somewhere else? Just checking what you mean. This site has a little bit of extra CSS to do our menu. We're hoping to get it in a future release, but honestly causes other conflicts with templates that we know a lot about, so we didn't want to include it yet due to the known support problems it would bring.

I typed all that, and then looked at your site and see the hover drop down is working now. I'm assuming you got something going that works for you, but if not, let us know.

2) As above, your menu is vertical now, so I think you're good. Our CSS can't really rely on a template to set the colors, because if the template doesn't have the right styles, then no colors (or conflicting colors) will be set. It's a tough game we have to play of either over-specifying the CSS (to make sure everything works exactly how it should) or under-specfiying it to allow the template to set some styles.. but, if it doesn't, then, again, we get in trouble. In the future, I'm sure we'll have to have either some default template's for the CSS (dark, light, red). Alternatively, we may have to add 20 extra settings in the module to set button color, menu color, background color, etc. It would get complex fast though, so that's not something we really like either.

3) There is no direct URL you can use in Joomla to log the user out. It has to be generated on each page load for the specific user logged in. That's why we have the special sclogout trick in our code which will replace that with the correct logout link for the user in that session. The PHP for the link would be:
$url = JRoute::_('index.php?option=com_users&task=user.logout&return=' . base64_encode('index.php') . JSession::getFormToken() . '=1');

Hope that all helps,
Alex
The topic has been locked.