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

Top link not clickable

Started by Muut Archive 11 years ago · 18 replies · 755 views
11 years ago

Is it possible to make the top link in the nav not clickable? I don't need them actual pages just a drop down heading. Thanks in advance

11 years ago

Really need some more information. What theme? What link? How about a screenshot?

11 years ago

dev.aiso.net - i don't want services or business solutions to be links or pages

11 years ago

Why don't you add a custom page header to those pages like this:

TXT
notlinkable: true

Then you can just have an if statement in your menu code:

TWIG
{% if page.header.notlinkable %}
<li><a href="{{ page.url">{{ page.menu }}</a></li>
{% else %}
<li><span>{{ page.menu }}</span></li>
{% endif %}

This is not going to match your code exactly, but you get the idea.

11 years ago

I do, I think. So bigger problem just happened. Can you take a look at the site please. I guess it is not possible to install plug ins from the admin area?

11 years ago

Opps i reversed the order of those if statements! Should of been the span one first, then the link.

11 years ago

Cool, but you can install plug ins via admin?

Sorry my old programmer died while working on this site...

11 years ago

Seriously. Not because of the site just because he had some serious cancer.

11 years ago

Yes of course you can install plugins via admin..

And sorry to hear about your developer! That's awful.

11 years ago

Hey the end if statement in navigation.html for making a link not clickable did not work. I switched the order like you said as well. Any other suggestions?

11 years ago

Not sure what you mean? Does it not output with a span???

11 years ago

na I get an error saying that the statement wasn't closed properly. I ended it with.

{% endif %}

10 years ago

Hi, i am also haveing that issue. when entering the scripted above in the top. i recieving this error 0 - Unclosed """ in "partials/navigation.html.twig" at line 48. can someone please help?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1362 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1124 9 years ago