Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
brusselsprouts

Make a folder link - but NOT on mobile?

Question

Hi, folks - I'm building a site using a Brine child theme. I wanted to make my folder links in my topline nav link to pages (which should be easy to do!) and found that several folks had crafted solutions to this, so that's great! I went with the simple HTML workaround described here, and it's working great.

However: I then noticed that on mobile, the folders I've added links to don't expand — they just go to the page I've linked to.

(For example: say I have a folder called "Projects." I renamed that folder

< a href="/projects" > Projects < /a >

...so that it now links to my "all projects" landing page. On desktop, a user could either mouse over "Projects" to see a list of projects, or click on "Projects" to go to that landing page. However, on mobile, the user can only tap "Projects," which takes you straight to the landing page, and doesn't allow you to see the list of projects that appear in the dropdown on desktop.)

My question, then: is there a workaround to make a folder link on desktop but NOT on mobile?

I know there are some Javascript-based solutions to the "add a link to your folder" issue (e.g. https://answers.squarespace.com/questions/23951/can-i-link-a-folder-to-a-specific-page.html). Since, well, I'm a complete Javascript noob: is there anything like a @media query for JS? i.e. could I modify that script to say, "if we're collapsed for mobile view, no link!" — or might there be any other ways to address this?

Thanks, all!

Edited by brusselsprouts
Initial Revision

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 0

You can make 2 folder link. and use CSS to hide 1 on Desktop, hide 1 on Mobile :-D @brusselsprouts


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0

You can make 2 folder link. and use CSS to hide 1 on Desktop, hide 1 on Mobile :-D @brusselsprouts


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...