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

Menu links not working #88

Open
BigDataKatha opened this issue Jun 11, 2018 · 3 comments
Open

Menu links not working #88

BigDataKatha opened this issue Jun 11, 2018 · 3 comments

Comments

@BigDataKatha
Copy link

Doing some research, I couldn't find an answer why the menu links are not working.

I have included the following in the schema.json file:

"id": "/city",
"links": [
    {
      "title": "City",
      "description": "City",
      "rel": "self",
      "href": "/city",
      "method": "GET",
      "targetSchema": {
        "rel": "self"
      }
    }
  ]

However, when clicking on the menu link, it doesn't direct me to the relevant section of the documentation. I believe that the issue is related to creating the double #city-city convention, but I don't know why it is happening.

Looking forward to some feedback. Thanks!

@handrews
Copy link
Contributor

I believe that the issue is related to creating the double #city-city convention, but I don't know why it is happening.

Yeah, that's definitely related. The HTML id is "city" but the anchor in the menu link is "city-city". Not sure why. The relevant code would be in doca-bootstrap-theme. Probably somewhere around here if you want to dig into debugging it some.

What versions of that package an json-schema-example-loader are you using? The structure of your output looks a little different from what's in the lines of code I linked to, but I'm not entirely confident I'm interpreting that right.

@BigDataKatha
Copy link
Author

BigDataKatha commented Jun 15, 2018

@handrews I found:

getLinks(schema.get('links'), search).valueSeq().map(function (link) {
              return React.createElement(
                'li',
                {
                  key: link.get('html_id'),
                  className: link.get('html_id') === activeId ? 'active' : ''
                },
                React.createElement(
                  'a',
                  { href: '#' + link.get('html_id') },
                  link.get('title')
                )
              );
            })

I am using the version 3.1.0

@handrews
Copy link
Contributor

Hmm... yeah nothing jumps out at me from that either, thanks for taking a look.

@tajo any ideas here?

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