Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMS main sidebar navigation missing #16

Open
egel opened this issue Dec 14, 2015 · 1 comment
Open

CMS main sidebar navigation missing #16

egel opened this issue Dec 14, 2015 · 1 comment

Comments

@egel
Copy link

egel commented Dec 14, 2015

During implementing sample models like example news, I've came across some difficulties.
The main navigation bar (related to nav object in CMS/config.json) and buttons are missing, but models can access directly with its links like:

  • http://.../cms/dashboard/news/
  • http://.../cms/dashboard/whatever/

Below I attach sample screen:
image

And snippet of CMS/config.json:

{
  "private": {
    <CUTTED>
  },
  "public": {
    "address":  "0.0.0.0",
    "port":     3005,
    "title":    "",
    "css":      "/css/custom.css",
    "authModel": "Accounts",
    "profileModel": "Account",
    "profileKey": "id",
    "defaultNav": {
      "route": "list",
      "params": {
        "model": "accounts"
      }
    },
    "customModules": [],
    "nav": [
      {
        "label":  "Accounts",
        "path":   "accounts",
        "icon":   "fa-user",
        "roles":  ["admin"],
        "url":    "/cms/dashboard/accounts",
        "defaultSubNavIndex": 1,
        "subnav": [
          <CUTTED>
        ]
      },
      {
        "label":  "News",
        "path":   "news",
        "icon":   "fa-newspaper-o",
        "roles":  ["admin", "manager", "editor"],
        "url":    "/cms/dashboard/news",
        "defaultSubNavIndex": 2,
        "subnav": [
          {
            "label": "Add",
            "route": "edit",
            "roles": ["admin", "editor", "manager"],
            "options": {
              "model":  "News",
              "key":    "id"
            }
          },
          {
            "label": "All News",
            "route": "list",
            "roles": ["admin", "editor", "manager"],
            "options": {
              "model": "News",
              "key": "id",
              "showFilter": true,
              "pageSize": 100,
              "params": {},
              "columns": [
                {
                  "field":    "id",
                  "display":  "ID",
                  "headerClass":  "center",
                  "width": 50
                },
                <CUTTED>
              ]
            }
          }
        ]
      }
    ]
  }
}

Did I miss something in config to enable main nav or is just bug?

Thanks in advance

@coolwr
Copy link
Contributor

coolwr commented Dec 22, 2015

Are you getting any javascript errors in your browser console? Try taking out the roles property to see if the navigation shows up. Could be the user you are logging in as doesn't have appropriate permission.

dan-h-ch pushed a commit to dan-h-ch/isbx-loopback-cms that referenced this issue Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants