Adding CCM Account Menu to Custom theme

Permalink 1 user found helpful
I've been googling for a couple of days now and can find plenty of people advising how to hide the CCM Account Menu, but how do I add support for it to a custom theme so it displays please?

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi dpdesignz,

In v8, It looks like the account menu is displayed by default. Overriding this site config value can disable it.
https://github.com/concrete5/concrete5/blob/develop/concrete/config/...

The account menu is added to front end pages by the footer_required element in themes.
- the footer_required element conditionally adds the account/menu element
https://github.com/concrete5/concrete5/blob/develop/concrete/element...
- the account menu is in the account/menu element
https://github.com/concrete5/concrete5/blob/develop/concrete/element...

The account menu will be added close to the closing body tag. The CSS in account.css will position it near the top right of the page. If the toolbar is visible, the account menu will be partially underneath it.

You can change where the account menu is added in the DOM by adding this HTML "<span id="ccm-account-menu-container"></span>" in your theme. JavaScript in account.js will check if this span exists, and if it does, it will move the account menu inside it. You can then add CSS to your theme to style or position it.
https://github.com/concrete5/concrete5/blob/develop/concrete/js/buil...

An example of using "<span id="ccm-account-menu-container"></span>" to change the account menu location can be found in the Elemental theme.
https://github.com/concrete5/concrete5/blob/develop/concrete/themes/...
janwidmer replied on at Permalink Reply
janwidmer
Hey..

I can't figure out how to either disable that dropdown or at least display it where I want. Currently, it's being displayed on the top right corner of the page beneath the c5 toolbar.

I tried setting the config value in my /application/config/app.php like this:
https://gist.github.com/janwidmer/c34278f078cc966694113b93e8848b69...

or adding the span "<span id="ccm-account-menu-container"></span>" somewhere in my footer, but the menu always stays in the top right corner..

I also tried to search for the variable $display_account_menu which is mentionend herehttps://github.com/concrete5/concrete5/blob/develop/concrete/config/... but still no luck..

Any Idea?

Thanks, Jan
Steevb replied on at Permalink Reply
Steevb
To disable account menu add code below to your main css file:
#ccm-account-menu{display: none}
MrKDilkington replied on at Permalink Reply
MrKDilkington
@janwidmer

What version of concrete5 are you using?

The default position of the account menu is set in the core account.css file. You will need to override that positioning in your theme.
#ccm-account-menu {
    position: absolute;
    top: 10px;
    right: 10px;
}

To disable the account menu, you would add the following code to site.php
application\config\site.php
<?php
return [
    'sites' => [
        'default' => [
            'user' => [
                'display_account_menu' => true,
            ]
        ]
    ]
];
janwidmer replied on at Permalink Reply
janwidmer
Hey MrKDilkington,

I am using Version 8.2.1. It seems that adding the span element "<span id="ccm-account-menu-container"></span>" to my theme does not change anything.

In version 8.2.1, there is no application\config\site.php, but only an app.php.
When I add the following code there, the dropdown still get's displayed:

return array(
   'sites' => array(
      'default' => array(
         'user' => array(
            'display_account_menu' => false,
         ),
      ),
   ),
);
MrKDilkington replied on at Permalink Reply
MrKDilkington
@janwidmer

You need to create the "application\config\site.php" path if it does not exist.
regans replied on at Permalink Reply
The sites.php worked for me. Thanks!
WarmanBuilding replied on at Permalink Reply
Do you know how to disable this menu from within the theme's php files?
pixinside replied on at Permalink Reply
Don't forget to add this to your CSS:

#ccm-account-menu {
    right: 80px;
    top: -10px;
  }
mlocati replied on at Permalink Reply
mlocati
The concrete5 account menu can also be disabled in the /dashboard/system/registration/profiles dashboard bate