I just took over a Grav site where I need to fix and finish the site. I have been reading the documentation and it has the admin panel installed and working but I can’t figure it out. My biggest issue right now is that the drop down menu does not work when I add a new page. If anyone could take a quick look it would be amazing… I know the last dev did a lot of customization to the header so maybe that is the problem? dev.aiso.net Thanks!!!
Not every theme necessarily has support for a dropdown menu. If your site has a theme based on Antimatter theme (default one that ships with Grav), then chances are the theme configuration (click on the theme preview in the menu) has a toggle to enable dropdown menu.
After it’s enabled, you then create child pages to create items for a dropdown.
If for some reason the theme does not have support for a dropdown menu, you could probably use the Antimatter theme as a sample of how to implement one.
Thanks for the response. I’m not seeing the theme preview but it is antimatter and the drop down is enabled in the antimatter.yaml
Then all you should need to do is add pages in a tree structure by ensuring pages have the correct ‘parent’:
If your continuing to have trouble, put a zip of the entire site on dropbox and send me the url to download to ‘rhuk at getgrav dot org’
Do you just need the user folder or the whole site? Thank you
easier if its the whole site as i can just unzip it and test.
alright, I’ll send it via wetransfer. Thank you for the help
Looking at your site, I don’t see any child pages under your top level pages. So there are no pages to show in a dropdown.
Also I’ve notice you are running a heavily modified antimatter theme. This is pretty dangerous because if you were to update antimatter, you would lose all your modifications. I strongly suggest renaming antimatter (and antimatter.yaml, antimatter.php, and in blueprints.yaml) etc. to something unique, perhaps alsonet
or something.
I appreciate that for sure. I’ll get that handled. I just published the child page dedicated hosting. I had it unpublished. Please check now
This is screenshot of your page structure. All the pages are top-level, i.e. they are at the same level, which is why they are displayed across the top in your menu. You need to create a folder, and page markdown inside that, inside one of those top level page folders.
Take a look at this site for example:
This has mutliple page levels, and as such multiple levels of dropdown.
BTW, please don’t focus on the admin during development unless you are simply adding content. Things are going to be much quicker if you can understand things at the file level… This is a file-based CMS after all
Yeah I am not doing that, I apologize, I am using ftp. Also the zip that I sent you was the local files on the remote it is set to the same as the screenshot. Capture
The dropdown is being output correctly, the problem is your theme no longer has any styling for it. It should only display when on hover of the parent and show a dropdown background etc.
Antimatter had some rudimentary styling, but the web is literally teaming with examples of how to do this. Here’s one i quickly googled: http://cssdeck.com/labs/another-simple-css3-dropdown-menu
Awesome, I thought something might be up with the CSS. I appreciate the help.