Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Changing menu name in agency

Started by Muut Archive 11 years ago · 9 replies · 992 views
11 years ago

Hi all, maybe this is a simple question, but it puzzled me. I downloaded agency theme and made some customization in .md files in pages folder. One thing I noticed was that the menu on nav bar still showed the default names (services, portfolio, etc). How can I change them? I already changed "Menu: " in the .md files to my intended menu name, but it didn't work. Can anyone help me? Thanks

11 years ago

One thing to try first is deleting the cache (bin/grav clear-cache). Next I'd try renaming the folders, e.g. pages/02.services to pages/02.newname

11 years ago

I did change the _folder name, and also rename .md files, but they did not give any effect. I haven't try clearing cache, but as far as I know grav clearing it's cache regularly.

11 years ago

The name that a page displays in the menu defaults to the title:. You can override this by providing an optional menu: field in the page header.

If that is not working, maybe you can provide a zip file with your changes and I can take a look?

11 years ago

I did provided menu: tag, but it didn't work. I changed /user/pages/01.menu/_services/services.md file. Where can I send the zip file to?

11 years ago

Put a zip up on dropbox/google/onedrive or something and paste the link here.

11 years ago

Ok, i'm not very familiar with Agency as I didn't write it, but I looked at your site, and if you look in the partials/base.html.twig file you will see the menu at the top is generated by the partials/navigation.html.twig file. If you look in there, you will see the menu is built by iterating over the links attribute of the site configuration. So just open up your user/config/site.yaml and adjust the name/links there:

YAML
# Links to include in footer navigation
# For external links add external: true
links:
  - title: Services
    url: '#services'
  - title: Portfolio
    url: '#portfolio'
  - title: About
    url: '#about'
  - title: Team
    url: '#team'  
  - title: Contact
    url: '#contact'   
11 years ago

Thank you very much rhukster! This was useful to me too :D

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1345 9 years ago
Archive · by Muut Archive, 9 years ago
2 932 9 years ago
Archive · by Muut Archive, 9 years ago
2 4059 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago