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 : entries duplicated #7

Closed
MarieMarieL opened this issue Feb 13, 2020 · 4 comments
Closed

Menu : entries duplicated #7

MarieMarieL opened this issue Feb 13, 2020 · 4 comments

Comments

@MarieMarieL
Copy link

Hi everybody,

I'm facing a problem with the menu in the header. I've written my menu in my config.toml file, and organized my content in folders (within the content/ folder of the project).
The problem is that every folder I added in content/ creates an entry in my menu, so I end up with a menu displaying entries corresponding to the config file and entries corresponding to my folders created in content/.
Then I have duplicates, where one entry comes from the config.toml file, and the second one from the folder structure (and takes the name of the .md that is in this folder)

I've attached a screen of a part of my menu, and a part of my folder structure to help understand my problem. (the duplicates are: {partners ; partners title}, {contact us ; contact us}, {resources > documentation ; documentations}

Code_0w1xsNVqtR

chrome_r3u4at5uFF

@tfsomrat
Copy link
Contributor

tfsomrat commented Feb 23, 2020

This is not a theme issue. i think you messed up. can please share your code?

@MarieMarieL
Copy link
Author

Which part of code would you need?

Here is my menu in config.toml

[menu]
[[menu.main]]
    name = "Try online"
    # url = "demo"
    weight = 1

 [[menu.main]]
    name = "Our offer"
    identifier = "offer"
    url = "offer/"
    weight = 2
    # hasChildren = true

     [[menu.main]]
        name = "Your challenges"
        parent = "offer"
        url = "challenges/"
        weight = 1

        [[menu.main]]
        name = "Product features"
        parent = "offer"
        url = "features/"
        weight = 2

        [[menu.main]]
        name = "Success stories"
        parent = "offer"
        url = "success-stories/"
        weight = 3

        [[menu.main]]
        name = "Pricing"
        parent = "offer"
        url = "pricing/"
        weight = 4

    [[menu.main]]
    name = "Partners"
    url = "partners/"
    weight = 3

    [[menu.main]]
    name = "Resources"
    # url = "resources"
    weight = 4
    hasChildren = true

        [[menu.main]]
        parent = "Resources"
        name = "News & Updates"
        url = "news-and-updates/"
        weight = 1

        [[menu.main]]
        parent = "Resources"
        name = "Documentation"
        url = "documentation/"
        weight = 2

        [[menu.main]]
        parent = "Resources"
        name = "Technical blog"
        url = "technical-blog/"
        weight = 3

    [[menu.main]]
    name = "Contact us"
    url = "contact/"
    weight = 5

And my _index.md page for the folder Partners (which only contains the index file)

---
title: "Partners title"
bg_image: "images/bg/bg02.jpg"
description : "Lorem ipsum"
draft: false
---

### Big title
Lorem ipsum

The weird thing is that the content written in the partners/_index.md doesn't appear on the website, while the content in the contact/_index.md is successfully displayed on the website (code below).

---
title: "Contact us"
bg_image: "images/bg/bg04.jpg"
description : "Lorem ipsum"
draft: false
---

Lorem ipsum

@tfsomrat
Copy link
Contributor

this code looks like ok. there is no problem. but why your navigation has duplicate menu i didn't get it. you can share your repository so i can pull the whole code and run it on my localhost. so i can get the problem.

@MarieMarieL
Copy link
Author

Just find where the problem came from!
In the config.toml, the menu seems to be automatically generated from the folders when this line: SectionPagesMenu = "main" is not commented.
I've just commented it and the menu now renders correctly

Thanks anyway for your answers!

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