At the moment I have modular anchor links in my menu to each modular page. I would also like blog to be included. When I click on blog I can no longer access the modular pages.
Hi @pamtbaau. Thanks for replying. Yes, I did search the forums and I found answers from a couple of years or more. The most relevant was on the quark theme and one where you gave the solution of editing the twig files. I was a little out of my depth here to be honest. Would this also apply to hola theme? No easy workaround?
@daniel, As far as I know, there is no easy fix to combine a modular menu with page menu items.
I havenāt looked at it for quite some time, so if things have changed, maybe someone else can shed some fresh light on it.
Apart from the technical issues, IMHO I think it is not the best user-experience to combine the two because they behave differently.
Why use a modular page anyway?
First of all, Iām not a fan of pages with needless/unexpected animations (eg. scrolling).
Single page layouts often suffer in performance because all html/js/css/images are loaded in one go.
When using multiple pages, scripts/css can be cached/reused for subsequent pages and extra scripts/css can be loaded when needed.
When showing menu items for a modular page, the designer probably suspects the user is not interested in the entire page, but parts of it. So why loading the entire page instead of loading smaller/lighter/faster separate pages?
ā¦
So my question is: What is the gain of a modular page? Except for the fancy scrolling it comes with and overlaying panels?
@pamtbaau I completely agree with you. Definitely from a technical and development perspective it makes complete sense to separate the pages. Where the conflict comes is from the user perspective. I have asked several people, including the client (who is my partner), what they think and all prefer the modular with its fancy scrolling. It is easier to work through the information without clicking links and makes it a continuous experience. The scrolling on clicking a link is also popular and works well for jumping to a topic. As it is a small amount of information, each section is small and the images are not too demanding I am OK with that and have to bend with the whim of the client (if I want to carry on sharing a bed).
This now leaves me with 3 options:
I use another website for a blog
I find a way to link back to the home page from the blog switching off the menus when the blog is running (which I understand is possible)
Use more links on the home page to each module / anchor
If there are other options I would be happy to hear them.
The first is possible, but inconvenient and time-consuming to run 2 sites.
The second I feel is messy
The third should be possible and the theme already has 2 links for this purpose.
@daniel, Yep, thatās what I wrote⦠On the Home page, clicked on the Blog menu-item to open the blog page. On the blog page, clicked the About menu-item to open the home page and showing the About child moduleā¦
Switching back to the About child-module isnāt that nice and smooth thoughā¦
@pamtbaau Iāve set this up this evening on http://grav2.hostchestnut.com
and still getting the same behaviour after following your steps. After accessing the blog page and then trying to access about, the URL below is given:
If you look at it well, in your page the link points to #contact, meanwhile in my site the link points to /#contacto.
The ā/ā is the difference. The ā#ā character points to some section in the same page (identified by āidā), meanwhile the ā/#ā characters points to some section in the root page.
Iām going to leave all the code of navigation.html.twig, to help you: