No click in a custom autonav
Permalink
Hello,
I am building a site based on the great solid groud theme by 1976Ltd. IWith the help of 1976Ltd i have changed the custom Nav menu so that the dropdowns are visible on media screens but the the nav is also working properly responsive.
My Question is, i want to give the 3 top level menu items a no click, so that they act as headings for the submenu's below. Best would be if those three items wouldn't have a page and wouldn't be clickable. But they still have to work in responsive mode as the do now.
I have absolutely no idea how to get this done, i have tried the redirect to first subpage but that just doesnt do it for me.
Anyone can help me with this?http://ikdachtvanwel.nl
Thanks!
Gerk
I am building a site based on the great solid groud theme by 1976Ltd. IWith the help of 1976Ltd i have changed the custom Nav menu so that the dropdowns are visible on media screens but the the nav is also working properly responsive.
My Question is, i want to give the 3 top level menu items a no click, so that they act as headings for the submenu's below. Best would be if those three items wouldn't have a page and wouldn't be clickable. But they still have to work in responsive mode as the do now.
I have absolutely no idea how to get this done, i have tried the redirect to first subpage but that just doesnt do it for me.
Anyone can help me with this?http://ikdachtvanwel.nl
Thanks!
Gerk
Thanks for the input, i have tried this and it is a usable alternative, but how do i get the cursor to no-click on the top items and to a pointer on the subitems? I have tried this in the css but couldnt make it work because of the responsivness.
And the custom classes do not seem to work.
And the custom classes do not seem to work.
The responsiveness, shouldn't make a difference really, all you will have to do is carry over any CSS rules into the media queries so they make their way onto the small screens too.
have you tried something like:
EDIT: Just to add to that if you can give the parent link a specific class, and just give that the default cursor CSS that should work.
have you tried something like:
li.has-dropdown a { cursor: default !important; }
EDIT: Just to add to that if you can give the parent link a specific class, and just give that the default cursor CSS that should work.
Thanks a lot Vidall, i have tried such before, but will dive deeper into it. Thanks!
@mhawke, thanks for the input, that is a solution i have tried before but that just doesn't nail it.
@mhawke, thanks for the input, that is a solution i have tried before but that just doesn't nail it.
What behaviour is missing with the add-on because it seems so close to what you're after. Perhaps the add-on can be easily modified to match your tastes.
Try unzipping the attached block and uploading resulting 'dead_link' folder to your [root]/blocks folder so you end up with [root]/blocks/dead_link/{block files}
Then go to Dashboard->Block Types and install the Dead Link block
I'm assuming you have a Global stack that holds your autonav. If you add this to your Global stack, then it uses jQuery to remove the href attribute from the link specified in the block.
Each block only disables one link so you have to add a block for each link you need to kill. If you have a whole bunch to kill, I could work up a block where you can add multiple links to one block.
Let me know if this works for you.
Then go to Dashboard->Block Types and install the Dead Link block
I'm assuming you have a Global stack that holds your autonav. If you add this to your Global stack, then it uses jQuery to remove the href attribute from the link specified in the block.
Each block only disables one link so you have to add a block for each link you need to kill. If you have a whole bunch to kill, I could work up a block where you can add multiple links to one block.
Let me know if this works for you.
This is what i was looking for, now i can disable hover over and put a redirect on /uri/ Thanks a million!
Glad it helped. I'm going to use it on my site as well!
Fantastic! This solves an issue that crossed my mind a few days ago! Before I dig in, one question... does this work if you place the dead link in a different place in each page to kill its respective link also?
The usage is very limited and kind of difficult to describe. It just removes the href from any link to a chosen page that appears on the page the block is installed on. So if you place it in a Global area, it will remove the href attribute throughout all pages. If you have a specific page on which you need to kill a link to another page, you can just add it anywhere on the page.
One benefit of doing it this way is that the < a >link< /a > still remains in the code so that any existing styling of the < a > tag still works.
Open up the zip file and have a look. It's pretty simple.
One benefit of doing it this way is that the < a >link< /a > still remains in the code so that any existing styling of the < a > tag still works.
Open up the zip file and have a look. It's pretty simple.
Just for fun, I updated the attached block to make sure it works with Pretty URLs off and I also added a way to change what kind of cursor appears when you hover over the dead link.
If you have already installed the original block, here's how to refresh your installation to use the new functionality:
1) Download the attached .zip file and expand it to your computer
2) Upload the contents to your [root]/blocks/dead_link folder, replacing the existing files.
3) Go to 'Dashboard->Block Types' and click on the 'Dead link' block.
4) Click the 'Refresh' button
That's it. You should see a drop-down for the cursor style when you edit the block.
If you have already installed the original block, here's how to refresh your installation to use the new functionality:
1) Download the attached .zip file and expand it to your computer
2) Upload the contents to your [root]/blocks/dead_link folder, replacing the existing files.
3) Go to 'Dashboard->Block Types' and click on the 'Dead link' block.
4) Click the 'Refresh' button
That's it. You should see a drop-down for the cursor style when you edit the block.
Go to the full sitemap from your dashboard, click on the "home" link in the sitemap, from the menu choose "External link" in the pop up window give your link a name, this will appear in your main nav, for example "about us" where it asks for a URL, just enter a hash "#", then click "add"
You will see the external link in your sitemap, then move your sub pages under it, when back on your site, you can click your new link and it will do nothing and go nowhere, but the sub pages underneath will all be live, hope that makes sense.