mecha-cms / mecha

Minimalist content management system.

Home Page:https://mecha-cms.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two “Home” Links

opened this issue · comments

After I finished installing Mecha, including the panel and user extensions, I deleted all pages through the panel, including the home, article, contact, and about page.

Through the panel, I re-created the index.page page with the title "Home", and what happened in the navigation appeared two "Home" links. First, ./ and second, ./index.

What's the problem, huh?

The first home link was added manually in the HTML markup. The home link from index.page will appear if your $state->path value is not set to /index. This is usually caused by the layout state that overrides the root state. For example, in your custom layout state file, you may have a path property that has value /article to force the home page path to the .\lot\page\article.* folder. Hence, the .\lot\page\index.* path will no longer becomes the default path and it will be visible in the navigation. But the .\lot\page\article.* path will be removed from navigation.

The simplest solution would be to rename your index.page file to index.archive 👍